Fix oxygen bar when player is in water and switches to spectate someone 784/head
authorterencehill <piuntn@gmail.com>
Sat, 21 Mar 2020 14:57:03 +0000 (15:57 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 22 Mar 2020 15:19:43 +0000 (16:19 +0100)
.gitlab-ci.yml
qcsrc/server/client.qc

index 15ea0ec..27ecdcb 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=6535600492e1cb63af8e449570bffe4a
+    - EXPECT=bf2cc71d0f8c160bd28a417978aa6a1a
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index 120f4c9..dcddced 100644 (file)
@@ -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;