From 02822bfc374b7e1edbbf650000b6ac409602d73f Mon Sep 17 00:00:00 2001 From: FruitieX Date: Wed, 9 Jun 2010 22:52:52 +0300 Subject: [PATCH] movement disabling patch by parasti, thanks :) --- qcsrc/client/Main.qc | 5 ++--- qcsrc/client/hud.qc | 10 ++++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) 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() -- 2.39.2