From fa41ea19b10c5cae8763f29b02040404cae036f0 Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 24 Jun 2024 17:05:32 +0100 Subject: [PATCH] CLIENT: Set setsensitivityscaler to 0 while paused This is to stop the controller stick from being able to turn the camera while paused. --- source/client/main.qc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/client/main.qc b/source/client/main.qc index b8229a6..6159ae6 100644 --- a/source/client/main.qc +++ b/source/client/main.qc @@ -663,7 +663,11 @@ noref void(float width, float height, float menushown) CSQC_UpdateView = setviewprop(VF_DRAWENGINESBAR, 0); setviewprop(VF_DRAWCROSSHAIR, 0); - setsensitivityscaler((1 + SCALE_CONSTANT * getstatf(STAT_VIEWZOOM)) / (1 + SCALE_CONSTANT)); + if (in_menu == MENU_PAUSE) + setsensitivityscaler(0); + else + setsensitivityscaler((1 + SCALE_CONSTANT * getstatf(STAT_VIEWZOOM)) / (1 + SCALE_CONSTANT)); + setviewprop(VF_AFOV, autocvar(fov,90)*getstatf(STAT_VIEWZOOM)); cvar_set("r_viewmodel_fov", ftos(cvar("r_viewmodel_default_fov")*getstatf(STAT_VIEWZOOM)));