From: terencehill Date: Mon, 25 May 2020 22:24:58 +0000 (+0200) Subject: Forbid telefrags while round hasn't started yet. Also update hash. X-Git-Tag: xonotic-v0.8.5~1027 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c508170b815826d8db563659e0c63c90cdd555de;p=xonotic%2Fxonotic-data.pk3dir.git Forbid telefrags while round hasn't started yet. Also update hash. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2bfacfbd8..ce1a4192d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 '^:' diff --git a/qcsrc/common/mapobjects/teleporters.qc b/qcsrc/common/mapobjects/teleporters.qc index da86cabce..987347283 100644 --- a/qcsrc/common/mapobjects/teleporters.qc +++ b/qcsrc/common/mapobjects/teleporters.qc @@ -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);