]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2674 "Voting screens in demos respond visually to client cursor making them...
authorterencehill <piuntn@gmail.com>
Wed, 9 Nov 2022 18:39:38 +0000 (19:39 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 9 Nov 2022 18:39:38 +0000 (19:39 +0100)
qcsrc/client/hud/hud.qc
qcsrc/client/hud/panel/chat.qc
qcsrc/client/mapvoting.qc

index cfb819efab9c30b5899d022412719d222fcadfcd..bf1db9e38fde5ab5586070beb7a4639907219190 100644 (file)
@@ -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))
index c1313b86e8f1d058c3ac23e56f19c73be801d097..448b9f408f954e2766762a28c0fff2e57ac8f478 100644 (file)
@@ -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)
index 6e6884f50c242ede6baecfe79f64eddc7ffe020c..e2aea3055ce0cd19fa5e686f0c6422160015f910 100644 (file)
@@ -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)