Add a notification for picking up extra lives
authorMario <mario.mario@y7mail.com>
Sat, 4 May 2013 22:48:09 +0000 (08:48 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 4 May 2013 22:48:09 +0000 (08:48 +1000)
qcsrc/common/notifications.qh
qcsrc/server/mutators/gamemode_lms.qc
qcsrc/server/t_items.qc

index 8a9c54fa6a35985fb15da4b227e787c512816dae..cf6c29f50749f70966edd910a5f312e6bfe27265 100644 (file)
@@ -491,6 +491,7 @@ void Send_Notification_WOVA(
        MSG_CENTER_NOTIF(1, CENTER_DEATH_TEAMKILL_FRAG,         1, 0, "s1",           NO_CPID,             "0 0", _("^K1Moron! You fragged ^BG%s^K1, a team mate!"), _("^K1Moron! You went against ^BG%s^K1, a team mate!")) \
        MSG_CENTER_NOTIF(1, CENTER_DEATH_TEAMKILL_FRAGGED,      1, 0, "s1",           NO_CPID,             "0 0", _("^K1You were fragged by ^BG%s^K1, a team mate"), _("^K1You were scored against by ^BG%s^K1, a team mate")) \
        MSG_CENTER_NOTIF(1, CENTER_DISCONNECT_IDLING,           0, 1, "",             CPID_IDLING,         "1 f1", _("^K1Stop idling!\n^BGDisconnecting in ^COUNT..."), "") \
+       MSG_CENTER_NOTIF(1, CENTER_EXTRALIVES,                          0, 0, "",             NO_CPID,             "0 0", _("^F2You picked up some extra lives"), "") \
        MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_FREEZE,            1, 0, "s1",           NO_CPID,             "0 0", _("^K3You froze ^BG%s"), "") \
        MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_FROZEN,            1, 0, "s1",           NO_CPID,             "0 0", _("^K1You were frozen by ^BG%s"), "") \
        MSG_CENTER_NOTIF(1, CENTER_FREEZETAG_REVIVE,            1, 0, "s1",           NO_CPID,             "0 0", _("^K3You revived ^BG%s"), "") \
index 88f5fcc3a41a1c1e8d2eccab6b9ca036103b7828..3e8ced87cca852bd5c375a99ac152488f7211b6f 100644 (file)
@@ -179,7 +179,10 @@ MUTATOR_HOOKFUNCTION(lms_ItemTouch)
 {
        // give extra lives for mega health
        if(self.items & IT_HEALTH)
+       {
+               Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_EXTRALIVES);
                PlayerScore_Add(other, SP_LMS_LIVES, autocvar_g_lms_extra_lives);
+       }
        
        return FALSE;
 }
index 3f50424b50e3f8f11bfb605cbfbb652b71d8a2a9..40abd18b135fe920265d197357927a458308f990 100644 (file)
@@ -653,7 +653,7 @@ float Item_GiveTo(entity item, entity player)
                        // sound not available
                        // AnnounceTo(player, "_lives");
                        player.armorvalue = bound(player.armorvalue, 999, player.armorvalue + autocvar_g_minstagib_extralives);
-                       sprint(player, "^3You picked up some extra lives\n");
+                       Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_EXTRALIVES);
                }
 
                // invis powerup