From: Rudolf Polzer Date: Tue, 14 Dec 2010 18:43:08 +0000 (+0100) Subject: make warpzones able to transport spectators too now X-Git-Tag: xonotic-v0.1.0preview~30 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c897fcc46f887d4b2da1b4700194ed6938899721;p=xonotic%2Fxonotic-data.pk3dir.git make warpzones able to transport spectators too now --- 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;