theoretically this should prevent calls to getCellId when we're wanting to

spawn objects that aren't in cells
This commit is contained in:
DarthArgus
2015-11-03 19:52:04 -06:00
parent 3c271e4eb8
commit bbfd352936
@@ -284,9 +284,14 @@ void spawnCreatures(int x, string datatable, obj_id self )
string planet = myself.area;
string spawnRoom = dataTableGetString (datatable, x, "room");
obj_id room = getCellId (self, spawnRoom);
if (spawnRoom != "world") {
obj_id room = getCellId (self, spawnRoom);
} else {
obj_id room = obj_id.NULL_ID;
}
if (!isIdValid (room) && (spawnRoom != "world"))
if ((spawnRoom != "world") && !isIdValid (room))
{
CustomerServiceLog("bad_spawner_data", "spawner " + self + ", datatable " + datatable + ", row " + x + ", mob " + spawn + ", room " + spawnRoom + " doesn't exist");
removeObjVar (self, SPAWNED + x);