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 1a9f60a5c..03d99c538 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"
@@ -649,6 +650,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; }
@@ -964,6 +971,9 @@ private:
*/
eShrapnelLevel m_TNTShrapnelLevel;
+ /** The maximum view distance that a player can have in this world. */
+ int m_MaxViewDistance;
+
/** Name of the nether world */
AString m_NetherWorldName;