Skip to content

Commit

Permalink
Stop bnpcs from moving when they have an active action #2
Browse files Browse the repository at this point in the history
  • Loading branch information
SapphireMordred committed Jan 7, 2025
1 parent 9967172 commit 25ab437
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/world/AI/Fsm/StateCombat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void AI::Fsm::StateCombat::onUpdate( Entity::BNpc& bnpc, uint64_t tickCount )

pNaviProvider->syncPosToChara( bnpc );

if( distance < ( bnpc.getNaviTargetReachedDistance() + pHatedActor->getRadius() ) )
if( !hasQueuedAction && distance < ( bnpc.getNaviTargetReachedDistance() + pHatedActor->getRadius() ) )
{
// todo: dont turn if facing
if( !bnpc.hasFlag( Entity::TurningDisabled ) )
Expand Down

0 comments on commit 25ab437

Please sign in to comment.