]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/warpzone/server.qc
Merge branch 'LegendaryGuard/avoid_spam_map_custom_fields' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / warpzone / server.qc
index 1bb1aeb6a404d0b8ed4ec2e3200c8c92446204e6..f58a9801b36ee7bd788d4ffe4641a27f27caf0c4 100644 (file)
@@ -117,7 +117,7 @@ float WarpZone_Teleport(entity wz, entity player, float f0, float f1)
                        o1 = o1 - v1 * (d / dv);
        }
 
-       // put him out of solid
+       // put them out of solid
        tracebox(o1 - player.view_ofs, player.mins, player.maxs, o1 - player.view_ofs, MOVE_NOMONSTERS, player);
        if(trace_startsolid)
        {
@@ -193,8 +193,7 @@ void WarpZone_Touch(entity this, entity toucher)
        if(toucher.move_movetype == MOVETYPE_NONE || toucher.move_movetype == MOVETYPE_FOLLOW || toucher.tag_entity)
                return;
 
-       if(WarpZoneLib_ExactTrigger_Touch(this, toucher))
-               return;
+       EXACTTRIGGER_TOUCH(this, toucher);
 
        if(WarpZone_PlaneDist(this, toucher.origin + toucher.view_ofs) >= 0) // wrong side of the trigger_warpzone (don't teleport yet)
                return;
@@ -809,14 +808,13 @@ void WarpZone_StartFrame()
                if(warpzone_warpzones_exist)
                        WarpZone_StoreProjectileData(it); // TODO: not actually needed
 
-               if(IS_OBSERVER(it) || it.solid == SOLID_NOT)
-               if(IS_CLIENT(it)) // we don't care about it being a bot
+               if((IS_OBSERVER(it) || it.solid == SOLID_NOT))
                {
                        // warpzones
                        if (warpzone_warpzones_exist) {
                                entity e = WarpZone_Find(it.origin + it.mins, it.origin + it.maxs);
                                if (e)
-                               if (!WarpZoneLib_ExactTrigger_Touch(e, it))
+                               if (WarpZoneLib_ExactTrigger_Touch(e, it, false))
                                if (WarpZone_PlaneDist(e, it.origin + it.view_ofs) <= 0)
                                        WarpZone_Teleport(e, it, -1, 0); // NOT triggering targets by this!
                        }
@@ -826,7 +824,7 @@ void WarpZone_StartFrame()
                        {
                                entity ent = Teleport_Find(it.origin + it.mins, it.origin + it.maxs);
                                if (ent)
-                               if (!WarpZoneLib_ExactTrigger_Touch(ent, it))
+                               if (WarpZoneLib_ExactTrigger_Touch(ent, it, false))
                                        Simple_TeleportPlayer(ent, it); // NOT triggering targets by this!
                        }
                }