From: terencehill Date: Wed, 3 Jun 2020 20:08:33 +0000 (+0200) Subject: cl_lockview 2 allows to control camera angles X-Git-Tag: xonotic-v0.8.5~950 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8b811952d57d19b567d5dca92e2c5ec7c3466c3b;p=xonotic%2Fxonotic-data.pk3dir.git cl_lockview 2 allows to control camera angles --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 9a753f5ff..99549a575 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -2044,16 +2044,20 @@ void View_PostProcessing() void View_Lock() { - if(autocvar_cl_lockview || (!autocvar_hud_cursormode && (autocvar__hud_configure && spectatee_status <= 0 || intermission > 1 || QuickMenu_IsOpened()))) - { + 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; + + // lock_type 1: lock origin and angles + // lock_type 2: lock only origin + if(lock_type >= 1) setproperty(VF_ORIGIN, freeze_org); - setproperty(VF_ANGLES, freeze_ang); - } else - { freeze_org = getpropertyvec(VF_ORIGIN); + if(lock_type == 1) + setproperty(VF_ANGLES, freeze_ang); + else freeze_ang = getpropertyvec(VF_ANGLES); - } } void View_DemoCamera() diff --git a/xonotic-client.cfg b/xonotic-client.cfg index 244faaa41..90d4bdbf4 100644 --- a/xonotic-client.cfg +++ b/xonotic-client.cfg @@ -758,7 +758,7 @@ set cl_lerpanim_maxdelta_server 0.1 // must be slower than slowest server contro seta cl_autodemo_delete_keeprecords 0 "when 1, records with a newly made race/cts demo are kept even if cl_autodemo_delete is used to delete demos" // freeze camera -set cl_lockview 0 "when 1, the camera does not move any more" +set cl_lockview 0 "when 1, the camera does not move any more; when 2, you can only control camera angles" // we now use mastervolume volume 1