X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fteleport.qc;h=5f545f01418488f4375c229715a06040e3fb2c87;hp=69e2c49c1d9c83b3ceb2b13fb3a14bc9f96e8f65;hb=29ba411594428929a9e9a0e0baa620210213bec7;hpb=cff3504ad5e8ace014ea44de7ad04ad6e246a277 diff --git a/qcsrc/common/triggers/trigger/teleport.qc b/qcsrc/common/triggers/trigger/teleport.qc index 69e2c49c1..5f545f014 100644 --- a/qcsrc/common/triggers/trigger/teleport.qc +++ b/qcsrc/common/triggers/trigger/teleport.qc @@ -1,3 +1,4 @@ +#include "teleport.qh" REGISTER_NET_LINKED(ENT_CLIENT_TRIGGER_TELEPORT) #ifdef SVQC @@ -42,7 +43,7 @@ void Teleport_Touch(entity this, entity toucher) #ifdef SVQC if(IS_PLAYER(toucher)) - RemoveGrapplingHook(toucher); + RemoveGrapplingHooks(toucher); #endif entity e; @@ -98,13 +99,14 @@ spawnfunc(trigger_teleport) return; } - this.teleport_next = teleport_first; - teleport_first = this; + IL_PUSH(g_teleporters, this); } #elif defined(CSQC) NET_HANDLE(ENT_CLIENT_TRIGGER_TELEPORT, bool isnew) { this.classname = "trigger_teleport"; + if(isnew) + IL_PUSH(g_teleporters, this); int mytm = ReadByte(); if(mytm) { this.team = mytm - 1; } this.spawnflags = ReadInt24_t(); this.active = ReadByte(); @@ -118,9 +120,6 @@ NET_HANDLE(ENT_CLIENT_TRIGGER_TELEPORT, bool isnew) this.move_time = time; defer(this, 0.25, teleport_findtarget); - this.teleport_next = teleport_first; - teleport_first = this; - return true; }