From d262a1667c791fa4db02da630c8f2d72e4742b14 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 8 Feb 2018 23:40:14 +1000 Subject: [PATCH] Move buff icon acquisition into the buff's WP_Format mutator hook --- qcsrc/common/mutators/mutator/buffs/cl_buffs.qc | 1 + qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/common/mutators/mutator/buffs/cl_buffs.qc b/qcsrc/common/mutators/mutator/buffs/cl_buffs.qc index a46a92d0a..f751eecff 100644 --- a/qcsrc/common/mutators/mutator/buffs/cl_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/cl_buffs.qc @@ -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; } } diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc index 720d92a57..4eef56ed1 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc @@ -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)) -- 2.39.2