]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix slow revival progress speed when reviving a player frozen by an ice nade
authorterencehill <piuntn@gmail.com>
Sun, 11 Apr 2021 21:41:45 +0000 (23:41 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 11 Apr 2021 21:41:45 +0000 (23:41 +0200)
qcsrc/common/mutators/mutator/nades/nades.qc

index 599edf926569f4e805c86df4f834d685e79761c4..a75a008043fd8770bac1b5c3cac4f5d8bc42c3ae 100644 (file)
@@ -1369,6 +1369,8 @@ MUTATOR_HOOKFUNCTION(nades, PlayerPreThink)
                if (n > 0 && STAT(FROZEN, player) == FROZEN_TEMP_DYING) // OK, there is at least one teammate reviving us
                {
                        STAT(REVIVE_PROGRESS, player) = bound(0, STAT(REVIVE_PROGRESS, player) + frametime * max(1/60, autocvar_g_freezetag_revive_speed), 1);
+                       // undo what PlayerPreThink did
+                       STAT(REVIVE_PROGRESS, player) = bound(0, STAT(REVIVE_PROGRESS, player) + frametime * player.revive_speed, 1);
                        SetResource(player, RES_HEALTH, max(1, STAT(REVIVE_PROGRESS, player) * start_health));
 
                        if(STAT(REVIVE_PROGRESS, player) >= 1)