From c50029d5abdcccf570ca54a1840047a5b9476b7c Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 21 Mar 2020 15:57:03 +0100 Subject: [PATCH] Fix oxygen bar when player is in water and switches to spectate someone --- .gitlab-ci.yml | 2 +- qcsrc/server/client.qc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 15ea0ec53..27ecdcb34 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=6535600492e1cb63af8e449570bffe4a + - EXPECT=bf2cc71d0f8c160bd28a417978aa6a1a - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg | tee /dev/stderr | grep '^:' diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 120f4c92b..dcddced84 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -337,6 +337,7 @@ void PutObserverInServer(entity this) this.strength_finished = 0; this.invincible_finished = 0; this.superweapons_finished = 0; + this.air_finished_stat = 0; //this.dphitcontentsmask = 0; this.dphitcontentsmask = DPCONTENTS_SOLID; if (autocvar_g_playerclip_collisions) @@ -1690,6 +1691,7 @@ void SpectateCopy(entity this, entity spectatee) this.strength_finished = spectatee.strength_finished; this.invincible_finished = spectatee.invincible_finished; this.superweapons_finished = spectatee.superweapons_finished; + this.air_finished_stat = spectatee.air_finished_stat; STAT(PRESSED_KEYS, this) = STAT(PRESSED_KEYS, spectatee); STAT(WEAPONS, this) = STAT(WEAPONS, spectatee); this.punchangle = spectatee.punchangle; -- 2.39.2