]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/teleporters.qc
Merge branch 'terencehill/noclip_death_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / teleporters.qc
index da86cabce89b83c048ed8a99342e07d501dcee2b..ab9c8dca570c1a3b196973b85515beb952489545 100644 (file)
@@ -16,7 +16,7 @@
     #include "../deathtypes/all.qh"
     #include "../turrets/sv_turrets.qh"
     #include "../vehicles/all.qh"
-    #include "../mapinfo.qh"
+    #include <common/gamemodes/_mod.qh>
     #include <server/anticheat.qh>
 #endif
 
@@ -146,9 +146,12 @@ void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angle
 #ifdef SVQC
        if(IS_PLAYER(player))
        {
-               if(tflags & TELEPORT_FLAG_TDEATH)
-                       if(player.takedamage && !IS_DEAD(player) && !g_race && !g_cts && (autocvar_g_telefrags || (tflags & TELEPORT_FLAG_FORCE_TDEATH)))
-                               tdeath(player, teleporter, telefragger, telefragmin, telefragmax);
+               if((tflags & TELEPORT_FLAG_TDEATH) && player.takedamage && !IS_DEAD(player)
+                       && !g_race && !g_cts && (autocvar_g_telefrags || (tflags & TELEPORT_FLAG_FORCE_TDEATH))
+                       && !(round_handler_IsActive() && !round_handler_IsRoundStarted()))
+               {
+                       tdeath(player, teleporter, telefragger, telefragmin, telefragmax);
+               }
 
                // player no longer is on ground
                UNSET_ONGROUND(player);