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()
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