This commit is contained in:
aozhiwei 2023-10-14 22:41:20 +08:00
parent 4cd9e474f2
commit ed9dbc7f55

View File

@ -340,7 +340,8 @@ behaviac::EBTStatus HeroAgent::CoIdle(int min_val, int max_val)
co->runing_cb =
[this, context] ()
{
if (GetRoom()->GetFrameNo() - context->frameno < context->time) {
if ((GetRoom()->GetFrameNo() - context->frameno) * FRAME_RATE_MS <
context->time) {
return behaviac::BT_RUNNING;
} else {
return behaviac::BT_SUCCESS;