From: Luca Cuzzocrea Date: Mon, 14 Aug 2017 10:14:14 +0000 (+0200) Subject: Fix: Now scoreboard is updated when a player is unfrozen with a nade (Issue #1935) X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f7b15903e65ae27b4d1998c53f3d233253cfe8cc;p=xonotic%2Fxonotic-data.pk3dir.git Fix: Now scoreboard is updated when a player is unfrozen with a nade (Issue #1935) --- diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 090ff82a3..b059b9672 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -1300,7 +1300,7 @@ MUTATOR_HOOKFUNCTION(nades, PlayerPreThink) if(player.revive_progress >= 1) { - Unfreeze(player); + freezetag_Unfreeze(player); Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_FREEZETAG_REVIVED, o.netname); Send_Notification(NOTIF_ONE, o, MSG_CENTER, CENTER_FREEZETAG_REVIVE, player.netname); @@ -1412,7 +1412,7 @@ MUTATOR_HOOKFUNCTION(nades, Damage_Calculate) if(frag_deathtype == DEATH_NADE.m_id) if(time - frag_inflictor.toss_time <= 0.1) { - Unfreeze(frag_target); + freezetag_Unfreeze(frag_target); frag_target.health = autocvar_g_freezetag_revive_nade_health; Send_Effect(EFFECT_ICEORGLASS, frag_target.origin, '0 0 0', 3); M_ARGV(4, float) = 0; diff --git a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc index 9e9878c36..ac9f3ad92 100644 --- a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc @@ -206,6 +206,7 @@ void freezetag_Unfreeze(entity this) this.freezetag_frozen_timeout = 0; Unfreeze(this); + freezetag_count_alive_players(); } float freezetag_isEliminated(entity e) @@ -317,7 +318,6 @@ void ft_RemovePlayer(entity this) if(!STAT(FROZEN, this)) freezetag_LastPlayerForTeam_Notify(this); freezetag_Unfreeze(this); - freezetag_count_alive_players(); } MUTATOR_HOOKFUNCTION(ft, ClientDisconnect) @@ -346,7 +346,6 @@ MUTATOR_HOOKFUNCTION(ft, PlayerDies) { if(STAT(FROZEN, frag_target)) freezetag_Unfreeze(frag_target); - freezetag_count_alive_players(); return true; // let the player die so that he can respawn whenever he wants } @@ -363,7 +362,9 @@ MUTATOR_HOOKFUNCTION(ft, PlayerDies) freezetag_LastPlayerForTeam_Notify(frag_target); } else + { freezetag_Unfreeze(frag_target); // remove ice + } frag_target.health = 0; // Unfreeze resets health frag_target.freezetag_frozen_timeout = -2; // freeze on respawn return true; @@ -478,7 +479,6 @@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST) if(player.revive_progress >= 1) { freezetag_Unfreeze(player); - freezetag_count_alive_players(); if(n == -1) {