summaryrefslogtreecommitdiff
path: root/src/content_sao.h
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2018-04-15 21:56:05 +0100
committerGitHub <noreply@github.com>2018-04-15 21:56:05 +0100
commit28813702d67f5d56a7e29cb9473278dcc2ea750e (patch)
treea6262ba0d04a2e2ef2693fa287df654347904d9a /src/content_sao.h
parent326eeca306f7bfb53ae3685eef18978dd81e587e (diff)
downloadminetest-28813702d67f5d56a7e29cb9473278dcc2ea750e.tar.gz
minetest-28813702d67f5d56a7e29cb9473278dcc2ea750e.tar.bz2
minetest-28813702d67f5d56a7e29cb9473278dcc2ea750e.zip
FOV: Raise lower limit to avoid zoom-loading of distant world (#7234)
In the client, raise lower limit from 30 to 45 degrees, to avoid server seeing this as a zoom and loading world beyond the server-set limit. Add minimum in settingtypes.txt and enforce lower limit when set using minetest.conf. In the server, distrust the client-sent FOV if below the heuristic zoom threshold and use the player object property 'zoom_fov' to check it, to protect against hacked clients.
Diffstat (limited to 'src/content_sao.h')
-rw-r--r--src/content_sao.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/content_sao.h b/src/content_sao.h
index 6583f31d6..59e3b3d4b 100644
--- a/src/content_sao.h
+++ b/src/content_sao.h
@@ -330,6 +330,7 @@ public:
v3f getEyePosition() const { return m_base_position + getEyeOffset(); }
v3f getEyeOffset() const;
+ float getZoomFOV() const;
inline Metadata &getMeta() { return m_meta; }