mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 08:03:45 +01:00
Zooming the camera requires the 'zoom' privilege
This commit is contained in:
parent
d1df09841d
commit
82494b8cc1
@ -54,4 +54,8 @@ core.register_privilege("noclip", {
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
core.register_privilege("rollback", "Can use the rollback functionality")
|
||||
core.register_privilege("zoom", {
|
||||
description = "Can zoom the camera",
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
|
||||
|
@ -390,7 +390,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime,
|
||||
|
||||
// Get FOV
|
||||
f32 fov_degrees;
|
||||
if (player->getPlayerControl().zoom) {
|
||||
if (player->getPlayerControl().zoom && m_gamedef->checkLocalPrivilege("zoom")) {
|
||||
fov_degrees = m_cache_zoom_fov;
|
||||
} else {
|
||||
fov_degrees = m_cache_fov;
|
||||
|
Loading…
Reference in New Issue
Block a user