1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-13 05:57:45 +00:00

Stop bnpcs from moving when they have an active action

This commit is contained in:
Mordred 2025-01-07 22:54:53 +01:00
parent 130c603f33
commit 996717250d

View file

@ -42,8 +42,9 @@ void AI::Fsm::StateCombat::onUpdate( Entity::BNpc& bnpc, uint64_t tickCount )
}
if( !bnpc.hasFlag( Entity::Immobile ) && distance > ( bnpc.getNaviTargetReachedDistance() + pHatedActor->getRadius() ) )
if( !hasQueuedAction && !bnpc.hasFlag( Entity::Immobile ) && distance > ( bnpc.getNaviTargetReachedDistance() + pHatedActor->getRadius() ) )
{
if( pNaviProvider )
pNaviProvider->setMoveTarget( bnpc, pHatedActor->getPos() );