]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Forbid telefrags while round hasn't started yet. Also update hash.
authorterencehill <piuntn@gmail.com>
Mon, 25 May 2020 22:24:58 +0000 (00:24 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 25 May 2020 22:24:58 +0000 (00:24 +0200)
.gitlab-ci.yml
qcsrc/common/mapobjects/teleporters.qc

index 2bfacfbd8fb96e224eb1d81942caa5c0c5245b6c..ce1a4192dd6614180a52e3ab8dbb3c8354482609 100644 (file)
@@ -29,7 +29,7 @@ test_sv_game:
     - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
     - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
     - make
-    - EXPECT=61bf5581bf55aa6113b565edb54c3943
+    - EXPECT=b06a71529b1664383cc6567fbb3f1257
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index da86cabce89b83c048ed8a99342e07d501dcee2b..987347283fb646e2b73e5569ccceb7d8a97a614f 100644 (file)
@@ -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);