From 5eb2dee0826fe4c1365e29010e5f034b6cdc1efd Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 5 May 2013 08:48:09 +1000 Subject: [PATCH] Add a notification for picking up extra lives --- qcsrc/common/notifications.qh | 1 + qcsrc/server/mutators/gamemode_lms.qc | 3 +++ qcsrc/server/t_items.qc | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 8a9c54fa6a..cf6c29f507 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -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"), "") \ diff --git a/qcsrc/server/mutators/gamemode_lms.qc b/qcsrc/server/mutators/gamemode_lms.qc index 88f5fcc3a4..3e8ced87cc 100644 --- a/qcsrc/server/mutators/gamemode_lms.qc +++ b/qcsrc/server/mutators/gamemode_lms.qc @@ -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; } diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 3f50424b50..40abd18b13 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -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 -- 2.39.2