From: Mario Date: Thu, 8 Feb 2018 13:40:14 +0000 (+1000) Subject: Move buff icon acquisition into the buff's WP_Format mutator hook X-Git-Tag: xonotic-v0.8.5~2328^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d262a1667c791fa4db02da630c8f2d72e4742b14;p=xonotic%2Fxonotic-data.pk3dir.git Move buff icon acquisition into the buff's WP_Format mutator hook --- 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))