Fixed spawner issue

This commit is contained in:
PrisonCamp
2014-12-23 02:02:45 -08:00
parent b4ee17dd61
commit 6c28f75490
@@ -186,18 +186,19 @@ void doSpawn( obj_id self, boolean onlySpawnOne )
string type = getGuardArea( self );
location me = getLocation(self);
location here = locations.getGoodLocationAroundLocation(me, 1f, 1f, 1.5f, 1.5f);
/*location here = locations.getGoodLocationAroundLocation(me, 1f, 1f, 1.5f, 1.5f);
if (here == null)
{
debugServerConsoleMsg (self, "guard_spawner couldn't find a good location");
return;
}
*/
string spawn = npcToSpawn( type );
obj_id npc = create.object( spawn, here );
obj_id npc = create.object( spawn, me );
if ( !isIdValid(npc) )
{
logScriptDataError("unable to spawn " + spawn + " + at loc " + here );
logScriptDataError("unable to spawn " + spawn + " + at loc " + me );
return;
}
attachScript (npc, "city.guard_wander");