summaryrefslogtreecommitdiffstats
path: root/src/World.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/World.h')
-rw-r--r--src/World.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/World.h b/src/World.h
index ec6dcadde..cc8906d95 100644
--- a/src/World.h
+++ b/src/World.h
@@ -26,6 +26,7 @@
#include "MapManager.h"
#include "Blocks/WorldInterface.h"
#include "Blocks/BroadcastInterface.h"
+#include "ClientHandle.h"
@@ -646,6 +647,12 @@ public:
eShrapnelLevel GetTNTShrapnelLevel(void) const { return m_TNTShrapnelLevel; }
void SetTNTShrapnelLevel(eShrapnelLevel a_Flag) { m_TNTShrapnelLevel = a_Flag; }
+ int GetMaxViewDistance(void) const { return m_MaxViewDistance; }
+ void SetMaxViewDistance(int a_MaxViewDistance)
+ {
+ m_MaxViewDistance = Clamp(a_MaxViewDistance, cClientHandle::MIN_VIEW_DISTANCE, cClientHandle::MAX_VIEW_DISTANCE);
+ }
+
bool ShouldUseChatPrefixes(void) const { return m_bUseChatPrefixes; }
void SetShouldUseChatPrefixes(bool a_Flag) { m_bUseChatPrefixes = a_Flag; }
@@ -961,6 +968,9 @@ private:
*/
eShrapnelLevel m_TNTShrapnelLevel;
+ /** The maximum view distance that a player can have. */
+ int m_MaxViewDistance;
+
/** Name of the nether world */
AString m_NetherWorldName;