]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Show nade throw message when it explodes while holding it in hand.
authorbyteManiak <bytemaniak98@gmail.com>
Sat, 26 Oct 2019 17:07:37 +0000 (18:07 +0100)
committerbyteManiak <bytemaniak98@gmail.com>
Sat, 26 Oct 2019 17:07:37 +0000 (18:07 +0100)
qcsrc/common/mutators/mutator/nades/nades.qc

index 8966cd9c96c27cf8f831b6bb72a21ab024f100b1..67e3d4ad1c02ccb86afa812b194ada6bf25e43c2 100644 (file)
@@ -1293,7 +1293,10 @@ MUTATOR_HOOKFUNCTION(nades, PlayerPreThink)
                held_nade.angles_y = player.angles.y;
 
                if (time + 0.1 >= held_nade.wait)
+               {
                        toss_nade(player, false, '0 0 0', time + 0.05);
+                       Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_NADE_THROW);
+               }
        }
 
        if(IS_PLAYER(player))
@@ -1452,8 +1455,6 @@ MUTATOR_HOOKFUNCTION(nades, PlayerDies, CBC_ORDER_LAST)
        {
                float killcount_bonus = ((CS(frag_attacker).killcount >= 1) ? bound(0, autocvar_g_nades_bonus_score_minor * CS(frag_attacker).killcount, autocvar_g_nades_bonus_score_medium) 
                                                                                                                                        : autocvar_g_nades_bonus_score_minor);
-               if (frag_attacker == frag_target)
-                       Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_NADE_THROW);
                if (SAME_TEAM(frag_attacker, frag_target) || frag_attacker == frag_target)
                        nades_RemoveBonus(frag_attacker);
                else if(GameRules_scoring_is_vip(frag_target))