From c897fcc46f887d4b2da1b4700194ed6938899721 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 14 Dec 2010 19:43:08 +0100 Subject: [PATCH] make warpzones able to transport spectators too now --- qcsrc/warpzonelib/server.qc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index f71fbe2d9..153ca6141 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -604,8 +604,36 @@ void WarpZone_StartFrame() self = e; WarpZones_Reconnect(); } + + entity oldself, oldother; + oldself = self; + oldother = other; for(e = world; (e = nextent(e)); ) + { WarpZone_StoreProjectileData(e); + float f; + f = clienttype(e); + if(f == CLIENTTYPE_REAL) + { + if(e.solid != SOLID_NOT) // not spectating? + continue; + self = WarpZone_Find(e.origin + e.mins, e.origin + e.maxs); + if(!self) + continue; + other = e; + if(WarpZoneLib_ExactTrigger_Touch()) + continue; + WarpZone_Teleport(e); // NOT triggering targets by this! + } + if(f == CLIENTTYPE_NOTACLIENT) + { + for(; (e = nextent(e)); ) + WarpZone_StoreProjectileData(e); + break; + } + } + self = oldself; + other = oldother; } .float warpzone_reconnecting; -- 2.39.2