]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/chat.qc
Fix #2674 "Voting screens in demos respond visually to client cursor making them...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / chat.qc
index c1313b86e8f1d058c3ac23e56f19c73be801d097..448b9f408f954e2766762a28c0fff2e57ac8f478 100644 (file)
@@ -13,6 +13,9 @@ float chat_maximized_scroll_ofs;
 float chat_maximized_reset_scroll_time;
 float HUD_Panel_Chat_InputEvent(float bInputType, float nPrimary, float nSecondary)
 {
+       if(!autocvar__con_chat_maximized)
+               return false;
+
        if(bInputType == 3)
        {
                mousepos.x = nPrimary;
@@ -26,9 +29,6 @@ float HUD_Panel_Chat_InputEvent(float bInputType, float nPrimary, float nSeconda
        // at this point bInputType can only be 0 or 1 (key pressed or released)
        bool key_pressed = (bInputType == 0);
 
-       if(!autocvar__con_chat_maximized)
-               return false;
-
        if(nPrimary == K_MWHEELUP)
        {
                if (!key_pressed)