]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move buff icon acquisition into the buff's WP_Format mutator hook
authorMario <mario@smbclan.net>
Thu, 8 Feb 2018 13:40:14 +0000 (23:40 +1000)
committerMario <mario@smbclan.net>
Thu, 8 Feb 2018 13:40:14 +0000 (23:40 +1000)
qcsrc/common/mutators/mutator/buffs/cl_buffs.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc

index a46a92d0aecdbfebfb844c0cc59610952dbbdf2d..f751eecff091ff08e775bde798813d748fdb0b2f 100644 (file)
@@ -17,6 +17,7 @@ MUTATOR_HOOKFUNCTION(cl_buffs, WP_Format)
         Buff b = Buffs_from(this.wp_extra);
         M_ARGV(2, vector) = b.m_color;
         M_ARGV(3, string) = b.m_prettyName;
+        M_ARGV(4, string) = strcat("buff_", b.m_name);
         return true;
     }
 }
index 720d92a57d6fa531df7f8c04c7f0d8fb77ff769e..4eef56ed153c6c19637a2ec105d9790915f3c588 100644 (file)
@@ -271,7 +271,6 @@ string spritelookupicon(entity this, string s)
     // TODO: needs icons! //if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
     if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).model2;
     if (s == WP_Item.netname) return Items_from(this.wp_extra).m_icon;
-    if (s == WP_Buff.netname) return strcat("buff_", Buffs_from(this.wp_extra).m_name);
     if (s == WP_Vehicle.netname) return Vehicles_from(this.wp_extra).m_icon;
     //if (s == WP_Monster.netname) return get_monsterinfo(this.wp_extra).m_icon;
     if (MUTATOR_CALLHOOK(WP_Format, this, s))