mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
simplify setpathdestination loop
This commit is contained in:
parent
83822f1148
commit
2956223a60
2 changed files with 5 additions and 5 deletions
|
|
@ -78,11 +78,11 @@ bool AIController::getAIMove(Move* movePtr)
|
|||
Point3F rotation = sbo->getTransform().toEuler();
|
||||
|
||||
#ifdef TORQUE_NAVIGATION_ENABLED
|
||||
if (sbo->getDamageState() == ShapeBase::Enabled)
|
||||
if (sbo->getDamageState() == ShapeBase::Enabled && getGoal())
|
||||
{
|
||||
if (mMovement.mMoveState != ModeStop)
|
||||
getNav()->updateNavMesh();
|
||||
if (getGoal() && !getGoal()->mObj.isNull())
|
||||
if (getGoal()->mObj.isValid())
|
||||
{
|
||||
if (getNav()->mPathData.path.isNull())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue