From 2f249ba88312a2d17721de6291aac5761537bf36 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 21 Sep 2020 17:51:05 +0200 Subject: [PATCH] Lock camera angles while moving the cursor if hud_cursormode is 0 in minigame menu and ONS radar too --- qcsrc/client/view.qc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index d7dc3996f..ee9164bae 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -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 -- 2.39.2