summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-11-02 00:05:47 +0100
committeradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-11-02 00:05:47 +0100
commit98aaa3239413ba58d6ada245b95aba87f6f02f18 (patch)
tree91c79b2a41a7bc7a904d3b5e17945e75cc34e4b8
parentfixed player spawning in the ground. (diff)
downloadcuberite-98aaa3239413ba58d6ada245b95aba87f6f02f18.tar
cuberite-98aaa3239413ba58d6ada245b95aba87f6f02f18.tar.gz
cuberite-98aaa3239413ba58d6ada245b95aba87f6f02f18.tar.bz2
cuberite-98aaa3239413ba58d6ada245b95aba87f6f02f18.tar.lz
cuberite-98aaa3239413ba58d6ada245b95aba87f6f02f18.tar.xz
cuberite-98aaa3239413ba58d6ada245b95aba87f6f02f18.tar.zst
cuberite-98aaa3239413ba58d6ada245b95aba87f6f02f18.zip
Diffstat (limited to '')
-rw-r--r--source/cWorld.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/cWorld.cpp b/source/cWorld.cpp
index 1a8425476..a5f4bf1c3 100644
--- a/source/cWorld.cpp
+++ b/source/cWorld.cpp
@@ -117,6 +117,7 @@ cWorld::cWorld( const char* a_WorldName )
m_SpawnY = 128;
m_SpawnZ = (double)((rand()%10000)-5000);
m_WorldSeed = rand();
+ m_GameMode = 0;
cIniFile IniFile( m_pState->WorldName + "/world.ini");
if( IniFile.ReadFile() )
@@ -125,6 +126,7 @@ cWorld::cWorld( const char* a_WorldName )
m_SpawnY = IniFile.GetValueF("SpawnPosition", "Y", m_SpawnY );
m_SpawnZ = IniFile.GetValueF("SpawnPosition", "Z", m_SpawnZ );
m_WorldSeed = IniFile.GetValueI("Seed", "Seed", m_WorldSeed );
+ m_GameMode = IniFile.GetValueI("GameMode", "GameMode", m_GameMode );
}
else
{
@@ -132,6 +134,7 @@ cWorld::cWorld( const char* a_WorldName )
IniFile.SetValueF("SpawnPosition", "Y", m_SpawnY );
IniFile.SetValueF("SpawnPosition", "Z", m_SpawnZ );
IniFile.SetValueI("Seed", "Seed", m_WorldSeed );
+ IniFile.SetValueI("GameMode", "GameMode", m_GameMode );
if( !IniFile.WriteFile() )
{
LOG("WARNING: Could not write to %s/world.ini", a_WorldName);
@@ -176,7 +179,6 @@ cWorld::cWorld( const char* a_WorldName )
m_Time = 0;
m_WorldTimeFraction = 0.f;
m_WorldTime = 0;
- m_GameMode = 0;
m_LastSave = 0;
m_LastUnload = 0;
m_ClientHandleCriticalSection = new cCriticalSection();
@@ -802,4 +804,4 @@ void cWorld::AddToRemoveEntityQueue( cEntity & a_Entity )
const char* cWorld::GetName()
{
return m_pState->WorldName.c_str();
-} \ No newline at end of file
+}