From 28b210f4e9d52a49fb7b7f0eccb7f2694612ee59 Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 5 Feb 2013 09:23:16 +0100 Subject: [PATCH] Fix check for hud_skin change that was always true, causing initialization of hud_skin_path every frame --- qcsrc/client/hud.qc | 5 ++++- qcsrc/client/hud.qh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index cc870794b..49ff69d3b 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -5082,11 +5082,14 @@ void HUD_Main (void) return; // Drawing stuff - if (hud_skin_path != autocvar_hud_skin) + if (hud_skin_prev != autocvar_hud_skin) { if (hud_skin_path) strunzone(hud_skin_path); hud_skin_path = strzone(strcat("gfx/hud/", autocvar_hud_skin)); + if (hud_skin_prev) + strunzone(hud_skin_prev); + hud_skin_prev = strzone(autocvar_hud_skin); } // HUD configure visible grid diff --git a/qcsrc/client/hud.qh b/qcsrc/client/hud.qh index 16ccd0c79..8c7557427 100644 --- a/qcsrc/client/hud.qh +++ b/qcsrc/client/hud.qh @@ -52,6 +52,7 @@ float menu_enabled_time; float hud_fade_alpha; string hud_skin_path; +string hud_skin_prev; var vector progressbar_color; -- 2.39.2