if you've stopped moving on purpose, you're not stuck

This commit is contained in:
AzaezelX 2025-04-16 17:40:53 -05:00
parent f3ef698e89
commit 14a03dfc6c
2 changed files with 2 additions and 0 deletions

View file

@ -322,6 +322,7 @@ void AIControllerData::resolveSpeed(AIController* obj, Point3F location, Move* m
void AIControllerData::resolveStuck(AIController* obj) void AIControllerData::resolveStuck(AIController* obj)
{ {
if (obj->mMovement.mMoveState == AIController::ModeStop) return;
ShapeBase* sbo = dynamic_cast<ShapeBase*>(obj->getAIInfo()->mObj.getPointer()); ShapeBase* sbo = dynamic_cast<ShapeBase*>(obj->getAIInfo()->mObj.getPointer());
// Don't check for ai stuckness if animation during // Don't check for ai stuckness if animation during
// an anim-clip effect override. // an anim-clip effect override.

View file

@ -155,6 +155,7 @@ void AINavigation::onReachDestination()
else else
#endif #endif
getCtrl()->throwCallback("onReachDestination"); getCtrl()->throwCallback("onReachDestination");
getCtrl()->mMovement.mMoveState = AIController::ModeStop;
} }
bool AINavigation::setPathDestination(const Point3F& pos) bool AINavigation::setPathDestination(const Point3F& pos)