From 10c8c75bb7fdfeb66874ae921e467336e619ef82 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 12 Mar 2012 19:39:41 +0000 Subject: Added a flat terrain generator with settable terrain height git-svn-id: http://mc-server.googlecode.com/svn/trunk@404 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWorld.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/cWorld.cpp') diff --git a/source/cWorld.cpp b/source/cWorld.cpp index 62c952ba1..91fbe7f64 100644 --- a/source/cWorld.cpp +++ b/source/cWorld.cpp @@ -184,6 +184,7 @@ cWorld::cWorld( const AString & a_WorldName ) { LOG("cWorld::cWorld(%s)", a_WorldName.c_str()); m_WorldName = a_WorldName; + m_IniFileName = m_WorldName + "/world.ini"; cMakeDir::MakeDir(m_WorldName.c_str()); @@ -197,7 +198,7 @@ cWorld::cWorld( const AString & a_WorldName ) AString GeneratorName; AString StorageSchema("Default"); - cIniFile IniFile( m_WorldName + "/world.ini"); + cIniFile IniFile(m_IniFileName); if( IniFile.ReadFile() ) { m_SpawnX = IniFile.GetValueF("SpawnPosition", "X", m_SpawnX ); @@ -219,7 +220,7 @@ cWorld::cWorld( const AString & a_WorldName ) IniFile.SetValue("Storage", "Schema", StorageSchema); if( !IniFile.WriteFile() ) { - LOG("WARNING: Could not write to %s/world.ini", a_WorldName.c_str()); + LOG("WARNING: Could not write to %s", m_IniFileName.c_str()); } } LOGINFO("Seed: %i", m_WorldSeed ); @@ -302,6 +303,7 @@ cWorld::cWorld( const AString & a_WorldName ) g_BlockTransparent[ E_BLOCK_RED_ROSE ] = true; g_BlockTransparent[ E_BLOCK_RED_MUSHROOM ] = true; g_BlockTransparent[ E_BLOCK_BROWN_MUSHROOM ] = true; + g_BlockTransparent[ E_BLOCK_SNOW ] = true; // TODO: Any other transparent blocks? -- cgit v1.2.3