summaryrefslogtreecommitdiffstats
path: root/src/World.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-11-16 15:13:39 +0100
committerMattes D <github@xoft.cz>2014-11-16 15:13:39 +0100
commita63eb1ac6e1838a23cd4c97eefd5085c7d97b43f (patch)
tree7d3535001019a6d648e83eb526be30ba538e485a /src/World.h
parentAPIDump: Fixed example cCompositeChat URL (diff)
parentRenamed m_UsedViewDistance to m_CurrentViewDistance (diff)
downloadcuberite-a63eb1ac6e1838a23cd4c97eefd5085c7d97b43f.tar
cuberite-a63eb1ac6e1838a23cd4c97eefd5085c7d97b43f.tar.gz
cuberite-a63eb1ac6e1838a23cd4c97eefd5085c7d97b43f.tar.bz2
cuberite-a63eb1ac6e1838a23cd4c97eefd5085c7d97b43f.tar.lz
cuberite-a63eb1ac6e1838a23cd4c97eefd5085c7d97b43f.tar.xz
cuberite-a63eb1ac6e1838a23cd4c97eefd5085c7d97b43f.tar.zst
cuberite-a63eb1ac6e1838a23cd4c97eefd5085c7d97b43f.zip
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;