]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
When game is frozen and player is drowning or inside lava don't damage them (don...
authorterencehill <piuntn@gmail.com>
Thu, 25 Jan 2018 19:17:54 +0000 (20:17 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 25 Jan 2018 19:17:54 +0000 (20:17 +0100)
qcsrc/server/client.qc
qcsrc/server/sv_main.qc

index d79445d09329e50c8160e2f414e710208df3f320..3d5f951a42e0b6b7d5be0ba019692c2aea9d1791 100644 (file)
@@ -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)
index 1e5435795ede10837845c36ebd35104ea2ad96d3..d2cc9b960b650dbcdab5fdeb39e616c7e44a3cb0 100644 (file)
@@ -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;