X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Ft_teleporters.qc;h=eba0ea0681b3ee22edfcc378e7ca1c23f1027b17;hb=4e43b7fd3576dcce513b2ac941cb406946a534be;hp=8a28216c9c520289e1140c2d7a053aebd6fd39c7;hpb=a06be5a7f61265c3f70c3acc68032a0218e81039;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/t_teleporters.qc b/qcsrc/server/t_teleporters.qc index 8a28216c9..eba0ea068 100644 --- a/qcsrc/server/t_teleporters.qc +++ b/qcsrc/server/t_teleporters.qc @@ -152,7 +152,11 @@ void Teleport_Touch (void) entity oldself, e; vector o; float p; + string s; + if (self.active != ACTIVE_ACTIVE) + return; + if (other.health < 1) return; if not(other.flags & FL_CLIENT) // FIXME: Make missiles firable through the teleport too @@ -208,14 +212,15 @@ void Teleport_Touch (void) o = e.origin + '0 0 1' * (1 - other.mins_z - 24); TeleportPlayer(self, other, o, e.mangle, v_forward * vlen(other.velocity), '0 0 0', '0 0 0', TELEPORT_FLAGS_TELEPORTER); - if(e.target) - { - oldself = self; - activator = other; - self = e; - SUB_UseTargets(); - self = oldself; - } + activator = other; + s = self.target; self.target = string_null; + SUB_UseTargets(); + if not(self.target) self.target = s; + + oldself = self; + self = e; + SUB_UseTargets(); + self = oldself; } void spawnfunc_info_teleport_destination (void) @@ -290,7 +295,9 @@ void spawnfunc_trigger_teleport (void) self.angles = '0 0 0'; EXACTTRIGGER_INIT; - + + self.active = ACTIVE_ACTIVE; + self.use = trigger_teleport_use; // this must be called to spawn the teleport waypoints for bots