mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-02 02:15:48 -04:00
theoretically this should prevent calls to getCellId when we're wanting to
spawn objects that aren't in cells
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user