summaryrefslogtreecommitdiffstats
path: root/source/cServer.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-09 17:37:34 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-09 17:37:34 +0200
commit47b675e47c6767c03de30854e7bc7071c8a078ea (patch)
tree8c73bee01afca99eee43f5559cc9145812a267aa /source/cServer.cpp
parentWorld generator uses the new Ini interface; also set new defaults for the generator to match the best generation we currently have (diff)
downloadcuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.tar
cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.tar.gz
cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.tar.bz2
cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.tar.lz
cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.tar.xz
cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.tar.zst
cuberite-47b675e47c6767c03de30854e7bc7071c8a078ea.zip
Diffstat (limited to '')
-rw-r--r--source/cServer.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/source/cServer.cpp b/source/cServer.cpp
index 1a8421bbb..8f8d28e7b 100644
--- a/source/cServer.cpp
+++ b/source/cServer.cpp
@@ -229,12 +229,7 @@ bool cServer::InitServer( int a_Port )
m_pState->ServerID = ServerID;
}
- m_ClientViewDistance = IniFile.GetValueI("Server", "DefaultViewDistance", -1);
- if (m_ClientViewDistance == -1)
- {
- m_ClientViewDistance = cClientHandle::DEFAULT_VIEW_DISTANCE;
- LOG("[Server].DefaultViewDistance not set, using a default of %d", m_ClientViewDistance);
- }
+ m_ClientViewDistance = IniFile.GetValueSetI("Server", "DefaultViewDistance", cClientHandle::DEFAULT_VIEW_DISTANCE);
if (m_ClientViewDistance < cClientHandle::MIN_VIEW_DISTANCE)
{
m_ClientViewDistance = cClientHandle::MIN_VIEW_DISTANCE;
@@ -245,6 +240,7 @@ bool cServer::InitServer( int a_Port )
m_ClientViewDistance = cClientHandle::MAX_VIEW_DISTANCE;
LOGINFO("Setting default viewdistance to the maximum of %d", m_ClientViewDistance);
}
+ IniFile.WriteFile();
}
m_NotifyWriteThread.Start(this);