summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-25 21:20:29 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-25 21:20:29 +0200
commit2c9e187189af11f59bb7026d2304536b8356c3a6 (patch)
tree6f5402ccc6db8e6637a1f8b2902595762405d733 /source
parentDebug filename has a "_debug" appended to it, so that it's different from the release version. (diff)
downloadcuberite-2c9e187189af11f59bb7026d2304536b8356c3a6.tar
cuberite-2c9e187189af11f59bb7026d2304536b8356c3a6.tar.gz
cuberite-2c9e187189af11f59bb7026d2304536b8356c3a6.tar.bz2
cuberite-2c9e187189af11f59bb7026d2304536b8356c3a6.tar.lz
cuberite-2c9e187189af11f59bb7026d2304536b8356c3a6.tar.xz
cuberite-2c9e187189af11f59bb7026d2304536b8356c3a6.tar.zst
cuberite-2c9e187189af11f59bb7026d2304536b8356c3a6.zip
Diffstat (limited to 'source')
-rw-r--r--source/ByteBuffer.cpp2
-rw-r--r--source/ChunkSender.cpp1
-rw-r--r--source/World.cpp15
3 files changed, 10 insertions, 8 deletions
diff --git a/source/ByteBuffer.cpp b/source/ByteBuffer.cpp
index 9ab1e4ca0..912f562f0 100644
--- a/source/ByteBuffer.cpp
+++ b/source/ByteBuffer.cpp
@@ -39,7 +39,7 @@ cByteBuffer::cByteBuffer(int a_BufferSize) :
cByteBuffer::~cByteBuffer()
{
- delete m_Buffer;
+ delete[] m_Buffer;
}
diff --git a/source/ChunkSender.cpp b/source/ChunkSender.cpp
index ea5ed91ea..a7afb801c 100644
--- a/source/ChunkSender.cpp
+++ b/source/ChunkSender.cpp
@@ -55,6 +55,7 @@ cChunkSender::~cChunkSender()
bool cChunkSender::Start(cWorld * a_World)
{
+ m_ShouldTerminate = false;
m_World = a_World;
return super::Start();
}
diff --git a/source/World.cpp b/source/World.cpp
index 1834a49da..7d095971d 100644
--- a/source/World.cpp
+++ b/source/World.cpp
@@ -217,12 +217,13 @@ cWorld::~cWorld()
-cWorld::cWorld( const AString & a_WorldName )
- : m_SpawnMonsterTime( 0.f )
- , m_RSList ( 0 )
- , m_Weather ( eWeather_Sunny )
+cWorld::cWorld(const AString & a_WorldName) :
+ m_SpawnMonsterTime(0.f),
+ m_RSList(0),
+ m_Weather(eWeather_Sunny),
+ m_WeatherInterval(24000) // Guaranteed 1 day of sunshine at server start :)
{
- LOG("cWorld::cWorld(%s)", a_WorldName.c_str());
+ LOGD("cWorld::cWorld(%s)", a_WorldName.c_str());
m_WorldName = a_WorldName;
m_IniFileName = m_WorldName + "/world.ini";
@@ -265,7 +266,7 @@ cWorld::cWorld( const AString & a_WorldName )
m_bAnimals = true;
m_SpawnMonsterRate = 10;
cIniFile IniFile2("settings.ini");
- if( IniFile2.ReadFile() )
+ if (IniFile2.ReadFile())
{
m_bAnimals = IniFile2.GetValueB("Monsters", "AnimalsOn", true );
m_SpawnMonsterRate = (float)IniFile2.GetValueF("Monsters", "AnimalSpawnInterval", 10);
@@ -303,7 +304,7 @@ cWorld::cWorld( const AString & a_WorldName )
// Save any changes that the defaults may have done to the ini file:
if (!IniFile.WriteFile())
{
- LOG("WARNING: Could not write to %s", m_IniFileName.c_str());
+ LOGWARNING("Could not write world config to %s", m_IniFileName.c_str());
}
}