]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/notifications.qh
Buffs: move definitions alongside buff mutator
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / notifications.qh
index 18cb7ee7f02c65944904cd9969f382a98afa01fa..f3cd0ba494ea482f77b60441f0d7219cc365a815 100644 (file)
@@ -284,6 +284,8 @@ const float ARG_DC = 6; // unique result to durcnt/centerprint
 // todo possible idea.... declare how many floats/strings each arg needs, and then dynamically increment the input
 // this way, we don't need to have duplicates like i.e. s2loc and s3loc?
 
+string BUFF_NAME(int i);
+
 #define NOTIF_ARGUMENT_LIST \
     ARG_CASE(ARG_CS_SV_HA,  "s1",            s1) \
     ARG_CASE(ARG_CS_SV_HA,  "s2",            s2) \
@@ -317,8 +319,8 @@ const float ARG_DC = 6; // unique result to durcnt/centerprint
     ARG_CASE(ARG_CS_SV,     "spree_end",     (autocvar_notification_show_sprees ? notif_arg_spree_inf(-1, "", "", f1) : "")) \
     ARG_CASE(ARG_CS_SV,     "spree_lost",    (autocvar_notification_show_sprees ? notif_arg_spree_inf(-2, "", "", f1) : "")) \
     ARG_CASE(ARG_CS_SV,     "item_wepname",  WEP_NAME(f1)) \
-    ARG_CASE(ARG_CS_SV,     "item_buffname", sprintf("%s%s", rgb_to_hexcolor(Buffs_from(f1).m_color), Buffs_from(f1).m_prettyName)) \
-    ARG_CASE(ARG_CS_SV,     "f3buffname",    sprintf("%s%s", rgb_to_hexcolor(Buffs_from(f3).m_color), Buffs_from(f3).m_prettyName)) \
+    ARG_CASE(ARG_CS_SV,     "item_buffname", BUFF_NAME(f1)) \
+    ARG_CASE(ARG_CS_SV,     "f3buffname",    BUFF_NAME(f3)) \
     ARG_CASE(ARG_CS_SV,     "item_wepammo",  (s1 != "" ? sprintf(_(" with %s"), s1) : "")) \
     ARG_CASE(ARG_DC,        "item_centime",  ftos(autocvar_notification_item_centerprinttime)) \
     ARG_CASE(ARG_SV,        "death_team",    Team_ColoredFullName(f1)) \