From b230dbd4aeb296247d9cd091ec2c09ae79d5185e Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Sun, 17 Feb 2013 18:32:26 -0500 Subject: [PATCH] Actually, make that argument smaller... plus, lets get rid of infval check --- qcsrc/common/notifications.qh | 12 ++++++------ qcsrc/server/g_damage.qc | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 9ffa908db..65513be92 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -54,8 +54,8 @@ ARG_CASE(ARG_BOTH, "f2", ftos(f2)) \ ARG_CASE(ARG_BOTH, "f3", ftos(f3)) \ ARG_CASE(ARG_BOTH, "f4", ftos(f4)) \ - ARG_CASE(ARG_BOTH, "f1perc2dec", ftos_decimals(f1/100, 2)) \ - ARG_CASE(ARG_BOTH, "f2perc2dec", ftos_decimals(f2/100, 2)) \ + ARG_CASE(ARG_BOTH, "f1p2dec", ftos_decimals(f1/100, 2)) \ + ARG_CASE(ARG_BOTH, "f2p2dec", ftos_decimals(f2/100, 2)) \ ARG_CASE(ARG_CSQC, "pass_key", ((((tmp_s = getcommandkey("pass", "+use")) != "pass") && !(strstrofs(tmp_s, "not bound", 0) >= 0)) ? sprintf(CCR(_(" ^F1(Press %s)")), tmp_s) : "")) \ ARG_CASE(ARG_CSQC, "frag_ping", ((f2 != BOT_PING) ? sprintf(CCR(_("\n(Ping ^2%d^BG)")), f2) : "")) \ ARG_CASE(ARG_CSQC, "frag_stats", sprintf(CCR(_("\n(Health ^1%d^BG / Armor ^2%d^BG)%s")), f1, f2, ((f3 != BOT_PING) ? sprintf(CCR(_(" (Ping ^2%d^BG)")), f3) : ""))) \ @@ -191,7 +191,7 @@ void Dump_Notifications(float fh, float alsoprint); /*MSG_INFO_NOTIF(INFO_EMPTY, 0, 0, "", "", "", "", "")*/ \ MULTITEAM_INFO(INFO_CTF_FLAGRETURN_DROPPED_, 2, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag was dropped in the base and returned itself\n"), "") \ MULTITEAM_INFO(INFO_CTF_FLAGRETURN_DAMAGED_, 2, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag was destroyed and returned to base\n"), "") \ - MULTITEAM_INFO(INFO_CTF_FLAGRETURN_SPEEDRUN_, 2, 0, 1, "f1perc2dec", "", "", _("^BGThe ^TC^TT^BG flag became impatient after ^F1%.2f^BG seconds and returned itself\n"), "") \ + MULTITEAM_INFO(INFO_CTF_FLAGRETURN_SPEEDRUN_, 2, 0, 1, "f1p2dec", "", "", _("^BGThe ^TC^TT^BG flag became impatient after ^F1%.2f^BG seconds and returned itself\n"), "") \ MULTITEAM_INFO(INFO_CTF_FLAGRETURN_NEEDKILL_, 2, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag fell somewhere it couldn't be reached and returned to base\n"), "") \ MULTITEAM_INFO(INFO_CTF_FLAGRETURN_ABORTRUN_, 2, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag was returned to base by its owner\n"), "") \ MULTITEAM_INFO(INFO_CTF_FLAGRETURN_TIMEOUT_, 2, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag has returned to the base\n"), "") \ @@ -199,9 +199,9 @@ void Dump_Notifications(float fh, float alsoprint); MULTITEAM_INFO(INFO_CTF_RETURN_, 2, 1, 0, "s1", "s1", "notify_%s_returned", _("^BG%s^BG returned the ^TC^TT^BG flag\n"), "") \ MULTITEAM_INFO(INFO_CTF_LOST_, 2, 1, 0, "s1", "s1", "notify_%s_lost", _("^BG%s^BG lost the ^TC^TT^BG flag\n"), "") \ MULTITEAM_INFO(INFO_CTF_CAPTURE_, 2, 1, 0, "s1", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag\n"), "") \ - MULTITEAM_INFO(INFO_CTF_CAPTURE_TIME_, 2, 1, 1, "s1 f1perc2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds\n"), "") \ - MULTITEAM_INFO(INFO_CTF_CAPTURE_BROKEN_, 2, 2, 2, "s1 f1perc2dec s2 f2perc2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds, breaking ^BG%s^BG's previous record of ^F2%s^BG seconds\n"), "") \ - MULTITEAM_INFO(INFO_CTF_CAPTURE_UNBROKEN_, 2, 2, 2, "s1 f1perc2dec s2 f2perc2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F2%s^BG seconds, failing to break ^BG%s^BG's previous record of ^F1%s^BG seconds\n"), "") \ + MULTITEAM_INFO(INFO_CTF_CAPTURE_TIME_, 2, 1, 1, "s1 f1p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds\n"), "") \ + MULTITEAM_INFO(INFO_CTF_CAPTURE_BROKEN_, 2, 2, 2, "s1 f1p2dec s2 f2p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds, breaking ^BG%s^BG's previous record of ^F2%s^BG seconds\n"), "") \ + MULTITEAM_INFO(INFO_CTF_CAPTURE_UNBROKEN_, 2, 2, 2, "s1 f1p2dec s2 f2p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F2%s^BG seconds, failing to break ^BG%s^BG's previous record of ^F1%s^BG seconds\n"), "") \ MULTITEAM_INFO(INFO_DEATH_TEAMKILL_, 4, 2, 1, "s1 s2 spree_end", "s2 s1", "notify_teamkill_%s", _("^BG%s^K1 was betrayed by ^BG%s^K1%s\n"), "") \ MSG_INFO_NOTIF(INFO_DEATH_FIRSTBLOOD, 2, 0, "s2", "", "", _("^BG%s^K1 drew first blood\n"), _("^F1%s^K1 got the first score\n")) \ MSG_INFO_NOTIF(INFO_DEATH_SELF_CUSTOM, 2, 1, "s1 s2 spree_end", "s1", "notify_void", _("^BG%s^K1 %s^K1%s\n"), "") \ diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 4f1e960b1..38f81a601 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -355,7 +355,7 @@ float Obituary_WeaponDeath(entity notif_target, float murder, float deathtype, s if(death_message) { Send_Notification_Legacy_Wrapper(NOTIF_ONE, notif_target, MSG_WEAPON, death_message, s1, s2, f1, 0, 0); - Send_Notification_Legacy_Wrapper(NOTIF_ANY_EXCEPT, notif_target, MSG_INFO, Get_Notif_Infval(MSG_WEAPON, death_message), s1, s2, f1, 0, 0); + Send_Notification_Legacy_Wrapper(NOTIF_ANY_EXCEPT, notif_target, MSG_INFO, msg_weapon_notifs[death_message - 1].nent_infoname, s1, s2, f1, 0, 0); //print(Get_Field_Value(F_INFVAL, MSG_WEAPON, death_message), "\n"); } else { dprint(sprintf("Obituary_WeaponDeath(): ^1Deathtype ^7(%s-%d)^1 has no notification for weapon %d!\n", Deathtype_Name(deathtype), deathtype, death_weapon)); } -- 2.39.2