From 283e7f5a744ac3bbb276feccf13db12d35d54836 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 25 Jan 2018 20:17:54 +0100 Subject: [PATCH] When game is frozen and player is drowning or inside lava don't damage them (don't play effect sounds as well) --- qcsrc/server/client.qc | 2 +- qcsrc/server/sv_main.qc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index d79445d09..3d5f951a4 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -2665,7 +2665,7 @@ void PlayerPreThink (entity this) void DrownPlayer(entity this) { - if(IS_DEAD(this)) + if(IS_DEAD(this) || game_stopped || time < game_starttime) return; if (this.waterlevel != WATERLEVEL_SUBMERGED || this.vehicle) diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index 1e5435795..d2cc9b960 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -126,6 +126,9 @@ void CreatureFrame_FallDamage(entity this) void CreatureFrame_All() { + if(game_stopped || time < game_starttime) + return; + IL_EACH(g_damagedbycontents, it.damagedbycontents, { if (it.move_movetype == MOVETYPE_NOCLIP) continue; -- 2.39.2