summaryrefslogtreecommitdiffstats
path: root/src/Server.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-12-23 23:39:53 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2020-12-26 17:58:53 +0100
commitd9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d (patch)
treec2763ddfe026c2121864d6ca5eae640f01133f7e /src/Server.cpp
parentReplace custom ChunkCoordinate with cChunkCoords (diff)
downloadcuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar
cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.gz
cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.bz2
cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.lz
cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.xz
cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.zst
cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.zip
Diffstat (limited to 'src/Server.cpp')
-rw-r--r--src/Server.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Server.cpp b/src/Server.cpp
index 4cb28d6ea..114c38946 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -214,20 +214,20 @@ bool cServer::InitServer(cSettingsRepositoryInterface & a_Settings, bool a_Shoul
m_ShouldLoadOfflinePlayerData = a_Settings.GetValueSetB("PlayerData", "LoadOfflinePlayerData", false);
m_ShouldLoadNamedPlayerData = a_Settings.GetValueSetB("PlayerData", "LoadNamedPlayerData", true);
- const auto ClientViewDistance = a_Settings.GetValueSetI("Server", "DefaultViewDistance", static_cast<int>(cClientHandle::DEFAULT_VIEW_DISTANCE));
- if (ClientViewDistance < static_cast<int>(cClientHandle::MIN_VIEW_DISTANCE))
+ const auto ClientViewDistance = a_Settings.GetValueSetI("Server", "DefaultViewDistance", cClientHandle::DEFAULT_VIEW_DISTANCE);
+ if (ClientViewDistance < cClientHandle::MIN_VIEW_DISTANCE)
{
m_ClientViewDistance = cClientHandle::MIN_VIEW_DISTANCE;
LOGINFO("Setting default view distance to the minimum of %d", m_ClientViewDistance);
}
- else if (ClientViewDistance > static_cast<int>(cClientHandle::MAX_VIEW_DISTANCE))
+ else if (ClientViewDistance > cClientHandle::MAX_VIEW_DISTANCE)
{
m_ClientViewDistance = cClientHandle::MAX_VIEW_DISTANCE;
LOGINFO("Setting default view distance to the maximum of %d", m_ClientViewDistance);
}
else
{
- m_ClientViewDistance = static_cast<unsigned>(ClientViewDistance);
+ m_ClientViewDistance = ClientViewDistance;
}
PrepareKeys();