]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix check for hud_skin change that was always true, causing initialization of hud_ski...
authorterencehill <piuntn@gmail.com>
Tue, 5 Feb 2013 08:23:16 +0000 (09:23 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 5 Feb 2013 08:23:16 +0000 (09:23 +0100)
qcsrc/client/hud.qc
qcsrc/client/hud.qh

index cc870794b10653a3dea145058a83693ab5282e3b..49ff69d3bd7cfd3b8ff114490454d5872fbc2f5f 100644 (file)
@@ -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
index 16ccd0c79c0d33aea202eaa3d7c2aab7b4b2721f..8c7557427ba095c6233b81f97b5e3ab636db8687 100644 (file)
@@ -52,6 +52,7 @@ float menu_enabled_time;
 float hud_fade_alpha;
 
 string hud_skin_path;
+string hud_skin_prev;
 
 var vector progressbar_color;