don't spool up new helper proxies if the goals are unchanged

This commit is contained in:
AzaezelX 2026-02-21 09:29:33 -06:00
parent 2dae0fbbad
commit 57890a4327
2 changed files with 45 additions and 6 deletions

View file

@ -194,7 +194,9 @@ DefineEngineMethod(AIController, getAimObject, S32, (), ,
"@see setAimObject()\n")
{
SceneObject* obj = dynamic_cast<GameBase*>(object->getAim()->mObj.getPointer());
SceneObject* obj = NULL;
if (object->getAim())
obj = dynamic_cast<GameBase*>(object->getAim()->mObj.getPointer());
return obj ? obj->getId() : -1;
}