else if(n == 1)
{
// exactly one dest - bots love that
- this.enemy = find(e, targetname, this.target);
+ this.enemy = find(NULL, targetname, this.target);
}
else
{
spawnfunc(target_teleporter)
{
+ if(this.target == "")
+ {
+ // actually a destination!
+ spawnfunc_info_teleport_destination(this);
+ return;
+ }
+
this.active = ACTIVE_ACTIVE;
this.use = target_teleport_use;
FOREACH_WORD(this.noise, true, precache_sound(it));
InitializeEntity(this, teleport_findtarget, INITPRIO_FINDTARGET);
-
- if (this.target == "")
- {
- objerror (this, "Teleporter with no target");
- return;
- }
}
#elif defined(CSQC)
NET_HANDLE(ENT_CLIENT_TRIGGER_TELEPORT, bool isnew)