]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/teleporters.qc
Some more defs.qh cleanup, update gameplay hash
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / teleporters.qc
index 339ade52a775cc86462c7f991b82a8d5ba8ac366..11cdf3bdd4d87c5b236ad1a03e055f383fab56e1 100644 (file)
     #include <server/constants.qh>
     #include <server/defs.qh>
     #include "../deathtypes/all.qh"
+    #include <server/sv_main.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 +147,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);
@@ -257,7 +261,7 @@ void teleport_findtarget(entity this)
        if(n == 0)
        {
                // no dest!
-               objerror (this, "Teleporter with nonexistant target");
+               objerror (this, "Teleporter with nonexistent target");
                return;
        }
        else if(n == 1)