mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
Fixed spawner issue
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user