Added potential memory saver.

This commit is contained in:
CekisSWG
2019-11-18 15:51:13 -05:00
parent d57564a717
commit 42aaad1104
2 changed files with 13 additions and 21 deletions
@@ -63,13 +63,15 @@ public class spawning extends script.base_script
}
public static void addToSpawnDebugList(obj_id self, obj_id spawned) throws InterruptedException
{
Vector debugSpawnList = new Vector();
debugSpawnList.setSize(0);
if(!utils.inDebugMode()) return;
Vector debugSpawnList;
if (utils.hasScriptVar(self, "debugSpawnList"))
{
debugSpawnList = utils.getResizeableObjIdArrayScriptVar(self, "debugSpawnList");
debugSpawnList = utils.addElement(debugSpawnList, spawned);
} else {
debugSpawnList = utils.addElement(new Vector(), spawned);
}
debugSpawnList = utils.addElement(debugSpawnList, spawned);
utils.setScriptVar(self, "debugSpawnList", debugSpawnList);
}
public static Vector getAllObjectsWithObjVar(location locTest, String strObjVarName) throws InterruptedException