mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'xMAC94x/fix_crash' into 'master'
fix crash when clamp mode is used by using min().max() rather than clamp See merge request veloren/veloren!3742
This commit is contained in:
commit
edb34116b4
@ -454,7 +454,7 @@ impl PlayState for SessionState {
|
||||
let mut cam_dir = camera.get_orientation();
|
||||
let cam_dir_clamp =
|
||||
(global_state.settings.gameplay.camera_clamp_angle as f32).to_radians();
|
||||
cam_dir.y = (-cam_dir_clamp).clamp(cam_dir.y, cam_dir_clamp);
|
||||
cam_dir.y = cam_dir.y.clamp(-cam_dir_clamp, cam_dir_clamp);
|
||||
camera.set_orientation(cam_dir);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user