mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
if you've stopped moving on purpose, you're not stuck
This commit is contained in:
parent
f3ef698e89
commit
14a03dfc6c
2 changed files with 2 additions and 0 deletions
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue