From 1e06c67321865b502c50f13ed65ac9b1734f89c6 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Fri, 3 Jan 2014 12:51:11 -0500 Subject: [PATCH] Fix for HUD weapon image usage --- qcsrc/client/hud.qc | 6 +++--- qcsrc/client/scoreboard.qc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 93f1b548c..de4fe077e 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -725,7 +725,7 @@ void HUD_Weapons(void) if(weapons_stat & WepSet_FromWeapon(self.weapon)) { // draw the weapon image - drawpic_aspect_skin(weapon_pos, strcat("weapon", self.netname), weapon_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawpic_aspect_skin(weapon_pos, self.model2, weapon_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); // draw weapon label string switch(autocvar_hud_panel_weapons_label) @@ -785,7 +785,7 @@ void HUD_Weapons(void) } else // draw a "ghost weapon icon" if you don't have the weapon { - drawpic_aspect_skin(weapon_pos, strcat("weapon", self.netname), weapon_size, '0 0 0', panel_fg_alpha * 0.5, DRAWFLAG_NORMAL); + drawpic_aspect_skin(weapon_pos, self.model2, weapon_size, '0 0 0', panel_fg_alpha * 0.5, DRAWFLAG_NORMAL); } // draw the complain message @@ -1649,7 +1649,7 @@ void HUD_Notify(void) a = entries - 1 - i; attacker = textShortenToWidth(sprintf(_("Player %d"), a+1), 0.48 * mySize_x - height, fontsize, stringwidth_colors); victim = textShortenToWidth(sprintf(_("Player %d"), a+2), 0.48 * mySize_x - height, fontsize, stringwidth_colors); - icon = strcat("weapon", get_weaponinfo(WEP_FIRST + mod(floor(a*2.4), WEP_LAST)).netname); + icon = get_weaponinfo(WEP_FIRST + mod(floor(a*2.4), WEP_LAST)).model2; a = bound(0, (when - a) / 4, 1); goto hud_config_notifyprint; } diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index dfae870cc..3b4c35006 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -1037,7 +1037,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) weapon_alpha = 0.2 * scoreboard_alpha_fg; // weapon icon - drawpic_aspect_skin(pos, strcat("weapon", self.netname), '1 0 0' * weapon_width + '0 1 0' * weapon_height, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL); + drawpic_aspect_skin(pos, self.model2, '1 0 0' * weapon_width + '0 1 0' * weapon_height, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL); // the accuracy if(weapon_stats >= 0) { weapons_with_stats += 1; -- 2.39.2