]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix: Now scoreboard is updated when a player is unfrozen with a nade (Issue #1935) lcuzzocrea/UpdateScoreboardWhenNadeUnfreeze
authorLuca Cuzzocrea <luca@cuzzocrea.xyz>
Mon, 14 Aug 2017 10:14:14 +0000 (12:14 +0200)
committerLuca Cuzzocrea <luca@cuzzocrea.xyz>
Mon, 14 Aug 2017 10:14:14 +0000 (12:14 +0200)
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/server/mutators/mutator/gamemode_freezetag.qc

index 090ff82a362f22c7555f851b4c3477ebcfac18fa..b059b96720b7e1837238a67ca3e04882109284ca 100644 (file)
@@ -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;
index 9e9878c3620b6230d9b72f31dfccd4232e1a7268..ac9f3ad923fe05ec340c2a15ba6857a025a3a409 100644 (file)
@@ -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)
                        {