]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/hud_config.qc
Merge branch 'sev/hud_ctf_update' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / hud_config.qc
index 5ffec682c0cf0868cd8dc0df1baeb138393c43ed..56a79364d49bbef3142efd7021ce3ea634885463 100644 (file)
@@ -642,7 +642,7 @@ void HUD_Panel_FirstInDrawQ(float id);
 void reset_tab_panels()
 {
        for (int i = 0; i < hud_panels_COUNT; ++i)
-               tab_panels[i] = world;
+               tab_panels[i] = NULL;
 }
 float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
 {
@@ -671,10 +671,8 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
        }
 
        // allow console bind to work
-       string con_keys;
-       float keys;
-       con_keys = findkeysforcommand("toggleconsole", 0);
-       keys = tokenize(con_keys); // findkeysforcommand returns data for this
+       string con_keys = findkeysforcommand("toggleconsole", 0);
+       int keys = tokenize(con_keys); // findkeysforcommand returns data for this
 
        bool hit_con_bind = false;
        int i;
@@ -706,7 +704,7 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                                highlightedAction = 0;
                                HUD_Panel_FirstInDrawQ(highlightedPanel.panel_id);
                        }
-                       tab_panel = world;
+                       tab_panel = NULL;
                        reset_tab_panels();
                }
        }
@@ -778,7 +776,7 @@ LABEL(find_tab_panel)
                level = floor(tab_panel_pos.y / level_height) * level_height; //starting level
                candidate_pos.x = (!tab_backward) ? vid_conwidth : 0;
                start_posX = tab_panel_pos.x;
-               tab_panel = world;
+               tab_panel = NULL;
                k=0;
                while(++k)
                {
@@ -805,11 +803,11 @@ LABEL(find_tab_panel)
                                reset_tab_panels();
                                if (!old_tab_panel)
                                {
-                                       tab_panel = world;
+                                       tab_panel = NULL;
                                        return true;
                                }
                                starting_panel = old_tab_panel;
-                               old_tab_panel = world;
+                               old_tab_panel = NULL;
                                goto find_tab_panel; //u must find tab_panel!
                        }
                        if (!tab_backward)
@@ -890,7 +888,7 @@ LABEL(find_tab_panel)
                        cvar_set(strcat("hud_panel_", highlightedPanel_backup.panel_name, "_pos"), s);
                        s = strcat(ftos(panel_size_backup.x/vid_conwidth), " ", ftos(panel_size_backup.y/vid_conheight));
                        cvar_set(strcat("hud_panel_", highlightedPanel_backup.panel_name, "_size"), s);
-                       highlightedPanel_backup = world;
+                       highlightedPanel_backup = NULL;
                }
        }
        else if(nPrimary == 's' && hudShiftState & S_CTRL) // save config
@@ -1078,7 +1076,7 @@ void HUD_Panel_Highlight(float allow_move)
                        return;
                }
        }
-       highlightedPanel = world;
+       highlightedPanel = NULL;
        highlightedAction = 0;
 }
 
@@ -1108,7 +1106,7 @@ void HUD_Panel_Mouse()
                        if (tab_panel)
                        {
                                //stop ctrl-tab selection
-                               tab_panel = world;
+                               tab_panel = NULL;
                                reset_tab_panels();
                        }
                        HUD_Panel_Highlight(mouseClicked & S_MOUSE1); // sets highlightedPanel, highlightedAction, panel_click_distance, panel_click_resizeorigin