]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/warpzonelib/server.qc
use the "contexts" to differentiate between different uses of the same word in some...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / warpzonelib / server.qc
index f71fbe2d985b37fc9279f11f98009f307c5540c5..f4141c8a3df01899ca3754c2bcb20c8a98f24cfe 100644 (file)
@@ -604,8 +604,38 @@ 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;
+                       if(e.movetype != MOVETYPE_NOCLIP && e.movetype != MOVETYPE_FLY) // not spectating? (this is to catch observers)
+                               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;