Merge branch 'development' of https://github.com/TorqueGameEngines/Torque3D into aiSubsystem

This commit is contained in:
AzaezelX 2025-05-03 15:25:36 -05:00
commit 4ba93dafc3
48 changed files with 2382 additions and 3705 deletions

View file

@ -102,7 +102,15 @@ DefineEngineFunction( isObject, bool, (const char * objectName), ,"isObject(obje
if (!String::compare(objectName, "0") || !String::compare(objectName, ""))
return false;
else
return (Sim::findObject(objectName) != NULL);
{
SimObject* obj= Sim::findObject(objectName);
if (obj)
{
if (!obj->isProperlyAdded() || obj->isRemoved())
obj = NULL;
}
return obj != NULL;
}
}
ConsoleDocFragment _spawnObject1(

View file

@ -3296,6 +3296,9 @@ DefineEngineMethod( SimObject, getGroup, SimGroup*, (),,
DefineEngineMethod( SimObject, delete, void, (),,
"Delete and remove the object." )
{
if (!object->isProperlyAdded() || object->isRemoved())
return;
object->deleteObject();
}