From: terencehill Date: Tue, 5 Feb 2013 08:23:16 +0000 (+0100) Subject: Fix check for hud_skin change that was always true, causing initialization of hud_ski... X-Git-Tag: xonotic-v0.7.0~98^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=28b210f4e9d52a49fb7b7f0eccb7f2694612ee59;p=xonotic%2Fxonotic-data.pk3dir.git Fix check for hud_skin change that was always true, causing initialization of hud_skin_path every frame --- 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;