Fix for #1465 "joining server while on map selection screen locks cursor"
authorterencehill <piuntn@gmail.com>
Sun, 5 Apr 2015 12:16:30 +0000 (14:16 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 5 Apr 2015 12:16:30 +0000 (14:16 +0200)
Setting hud_configure_prev to -1 to detect the very first frame isn't useful anymore.

qcsrc/client/hud.qc
qcsrc/client/hud_config.qc
qcsrc/client/main.qc

index a596208..74a5df1 100644 (file)
@@ -4286,12 +4286,12 @@ void HUD_CenterPrint (void)
        {
                if(!autocvar_hud_panel_centerprint) return;
 
-               if (hud_configure_prev && hud_configure_prev != -1)
+               if(hud_configure_prev)
                        reset_centerprint_messages();
        }
        else
        {
-               if (!hud_configure_prev)
+               if(!hud_configure_prev)
                        reset_centerprint_messages();
                if (time > hud_configure_cp_generation_time)
                {
index 898f3eb..4ddc049 100644 (file)
@@ -1233,7 +1233,7 @@ void HUD_Configure_Frame()
                        return;
                }
 
-               if(!hud_configure_prev || hud_configure_prev == -1)
+               if(!hud_configure_prev)
                {
                        if(autocvar_hud_cursormode)
                                setcursormode(1);
index 13f9545..36ec4f7 100644 (file)
@@ -158,8 +158,6 @@ void CSQC_Init(void)
        WarpZone_Init();
 
        hud_skin_path = strzone(strcat("gfx/hud/", autocvar_hud_skin));
-       hud_configure_prev = -1;
-
        draw_currentSkin = strzone(strcat("gfx/menu/", cvar_string("menu_skin")));
 }