]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Lock camera angles while moving the cursor if hud_cursormode is 0 in minigame menu...
authorterencehill <piuntn@gmail.com>
Mon, 21 Sep 2020 15:51:05 +0000 (17:51 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 21 Sep 2020 15:51:05 +0000 (17:51 +0200)
qcsrc/client/view.qc

index d7dc3996f8913615e7f0707c0e30e6dfdf5b9af2..ee9164bae1a279b4c0038441b7b595c637c4a26f 100644 (file)
@@ -1307,9 +1307,17 @@ void View_PostProcessing()
 
 void View_Lock()
 {
-       int lock_type = (!autocvar_hud_cursormode && ((autocvar__hud_configure && spectatee_status <= 0) || intermission > 1 || QuickMenu_IsOpened()));
-       if (lock_type == 0)
-               lock_type = autocvar_cl_lockview;
+       int lock_type = autocvar_cl_lockview;
+
+       if (!autocvar_hud_cursormode
+               && ((autocvar__hud_configure && spectatee_status <= 0)
+                       || intermission > 1
+                       || HUD_Radar_Clickable()
+                       || HUD_MinigameMenu_IsOpened()
+                       || QuickMenu_IsOpened()
+               )
+       )
+               lock_type = 1;
 
        // lock_type 1: lock origin and angles
        // lock_type 2: lock only origin