From 8a98fd57fc6c4a2cb0aea6a73c12ad9fc25e7e1f Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 9 Nov 2022 19:39:38 +0100 Subject: [PATCH] Fix #2674 "Voting screens in demos respond visually to client cursor making them confusing" --- qcsrc/client/hud/hud.qc | 2 +- qcsrc/client/hud/panel/chat.qc | 6 +++--- qcsrc/client/mapvoting.qc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index cfb819efa..bf1db9e38 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -671,7 +671,7 @@ bool HUD_WouldShowCursor() { if(autocvar__hud_configure) return true; - if(mv_active) + if(mv_active && !isdemo()) return true; //entity local_player = ((csqcplayer) ? csqcplayer : CSQCModel_server2csqc(player_localentnum - 1)); // TODO: doesn't use regular cursor handling //if(local_player.viewloc && (local_player.viewloc.spawnflags & VIEWLOC_FREEAIM)) diff --git a/qcsrc/client/hud/panel/chat.qc b/qcsrc/client/hud/panel/chat.qc index c1313b86e..448b9f408 100644 --- a/qcsrc/client/hud/panel/chat.qc +++ b/qcsrc/client/hud/panel/chat.qc @@ -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) diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index 6e6884f50..e2aea3055 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -843,7 +843,7 @@ float MapVote_InputEvent(int bInputType, float nPrimary, float nSecondary) TC(int, bInputType); static int first_digit = 0; - if (!mv_active) + if (!mv_active || isdemo()) return false; if(bInputType == 3) -- 2.39.2