From: terencehill Date: Wed, 9 Nov 2022 18:39:38 +0000 (+0100) Subject: Fix #2674 "Voting screens in demos respond visually to client cursor making them... X-Git-Tag: xonotic-v0.8.6~299 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8a98fd57fc6c4a2cb0aea6a73c12ad9fc25e7e1f;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2674 "Voting screens in demos respond visually to client cursor making them confusing" --- 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)