]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
movement disabling patch by parasti, thanks :)
authorFruitieX <rasse@rasse-lappy.localdomain>
Wed, 9 Jun 2010 19:52:52 +0000 (22:52 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Wed, 9 Jun 2010 19:52:52 +0000 (22:52 +0300)
qcsrc/client/Main.qc
qcsrc/client/hud.qc

index e87c249005e2659500ae1fbff2f26559c8de42f5..bf903bdb05f9b30c3044994795f510364a693c81 100644 (file)
@@ -638,9 +638,8 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
        local float bSkipKey;
        bSkipKey = false;
 
-       if(hud_configure)
-               if (HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary))
-                       return true;
+       if (HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary))
+               return true;
 
        if (MapVote_InputEvent(bInputType, nPrimary, nSecondary))
                return true;
index 8ebb802e340217b20d5f87771baa43232fd278cd..8c2f246bc205be25d7b4935289a8f129c75271e5 100644 (file)
@@ -1163,6 +1163,9 @@ float mouseClicked;
 float prevMouseClicked; // previous state
 float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
 {
+       if(!hud_configure)
+               return false;
+
        prevMouseClicked = mouseClicked;
        if(nPrimary == K_MOUSE1)
        {
@@ -1170,12 +1173,15 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                        mouseClicked = 1;
                        return true;
                }
-               if(bInputType == 1) {// key released
+               else if(bInputType == 1) {// key released
                        mouseClicked = 0;
                        return true;
                }
        }
-       return false;
+       else if(nPrimary == K_ESCAPE)
+               cvar_set("_hud_configure", "0");
+
+       return true; // Suppress ALL other input
 }
 
 void HUD_Panel_Mouse()