diff options
author | Mattes D <github@xoft.cz> | 2014-05-09 18:31:48 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-05-09 18:32:04 +0200 |
commit | dd350bc1f3df51a6e4b956ee5cdbc3ecae8ddeb6 (patch) | |
tree | 6eae6890257b43af8517ea7d40b70a58fbb7b72b | |
parent | Lighting thread disabled its chunkstays before deleting them. (diff) | |
download | cuberite-dd350bc1f3df51a6e4b956ee5cdbc3ecae8ddeb6.tar cuberite-dd350bc1f3df51a6e4b956ee5cdbc3ecae8ddeb6.tar.gz cuberite-dd350bc1f3df51a6e4b956ee5cdbc3ecae8ddeb6.tar.bz2 cuberite-dd350bc1f3df51a6e4b956ee5cdbc3ecae8ddeb6.tar.lz cuberite-dd350bc1f3df51a6e4b956ee5cdbc3ecae8ddeb6.tar.xz cuberite-dd350bc1f3df51a6e4b956ee5cdbc3ecae8ddeb6.tar.zst cuberite-dd350bc1f3df51a6e4b956ee5cdbc3ecae8ddeb6.zip |
-rw-r--r-- | src/World.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/World.cpp b/src/World.cpp index b20e017bc..807065bfa 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -394,10 +394,14 @@ void cWorld::InitializeSpawn(void) // For the debugging builds, don't make the server build too much world upon start: #if defined(_DEBUG) || defined(ANDROID_NDK) - int ViewDist = 9; + const int DefaultViewDist = 9; #else - int ViewDist = 20; // Always prepare an area 20 chunks across, no matter what the actual cClientHandle::VIEWDISTANCE is + const int DefaultViewDist = 20; // Always prepare an area 20 chunks across, no matter what the actual cClientHandle::VIEWDISTANCE is #endif // _DEBUG + cIniFile IniFile; + IniFile.ReadFile(m_IniFileName); + int ViewDist = IniFile.GetValueSetI("SpawnPosition", "PregenerateDistance", DefaultViewDist); + IniFile.WriteFile(m_IniFileName); LOG("Preparing spawn area in world \"%s\"...", m_WorldName.c_str()); for (int x = 0; x < ViewDist; x++) |