From: FruitieX Date: Wed, 9 Jun 2010 19:52:52 +0000 (+0300) Subject: movement disabling patch by parasti, thanks :) X-Git-Tag: xonotic-v0.1.0preview~541^2~78 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=02822bfc374b7e1edbbf650000b6ac409602d73f;p=xonotic%2Fxonotic-data.pk3dir.git movement disabling patch by parasti, thanks :) --- diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index e87c24900..bf903bdb0 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -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; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 8ebb802e3..8c2f246bc 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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()