summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/BlockArea.cpp4
-rw-r--r--src/ChunkDef.h2
-rw-r--r--src/ClientHandle.cpp10
-rw-r--r--src/DeadlockDetect.cpp4
-rw-r--r--src/Generating/Caves.cpp3
-rw-r--r--src/Generating/ChunkGenerator.cpp1
-rw-r--r--src/Generating/HeiGen.cpp8
-rw-r--r--src/HTTPServer/HTTPConnection.cpp3
-rw-r--r--src/HTTPServer/HTTPFormParser.cpp8
-rw-r--r--src/LightingThread.cpp6
-rw-r--r--src/Noise.cpp5
-rw-r--r--src/PolarSSL++/SslContext.cpp1
-rw-r--r--src/Server.cpp4
-rw-r--r--src/WorldStorage/FastNBT.h4
14 files changed, 54 insertions, 9 deletions
diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp
index a0dcb5ec8..90f7ca6c9 100644
--- a/src/BlockArea.cpp
+++ b/src/BlockArea.cpp
@@ -1764,7 +1764,9 @@ NIBBLETYPE cBlockArea::GetNibble(int a_BlockX, int a_BlockY, int a_BlockZ, NIBBL
cBlockArea::cChunkReader::cChunkReader(cBlockArea & a_Area) :
m_Area(a_Area),
- m_Origin(a_Area.m_Origin.x, a_Area.m_Origin.y, a_Area.m_Origin.z)
+ m_Origin(a_Area.m_Origin.x, a_Area.m_Origin.y, a_Area.m_Origin.z),
+ m_CurrentChunkX(0),
+ m_CurrentChunkZ(0)
{
}
diff --git a/src/ChunkDef.h b/src/ChunkDef.h
index dbb782d26..51075ab4a 100644
--- a/src/ChunkDef.h
+++ b/src/ChunkDef.h
@@ -419,7 +419,7 @@ public:
X Data;
cCoordWithData(int a_X, int a_Y, int a_Z) :
- x(a_X), y(a_Y), z(a_Z)
+ x(a_X), y(a_Y), z(a_Z), Data()
{
}
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index e2b438831..ee4fdfa7d 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -75,11 +75,21 @@ cClientHandle::cClientHandle(const cSocket * a_Socket, int a_ViewDistance) :
m_TimeSinceLastPacket(0),
m_Ping(1000),
m_PingID(1),
+ m_PingStartTime(0),
+ m_LastPingTime(1000),
m_BlockDigAnimStage(-1),
+ m_BlockDigAnimSpeed(0),
+ m_BlockDigAnimX(0),
+ m_BlockDigAnimY(256), // Invalid Y, so that the coords don't get picked up
+ m_BlockDigAnimZ(0),
m_HasStartedDigging(false),
+ m_LastDigBlockX(0),
+ m_LastDigBlockY(256), // Invalid Y, so that the coords don't get picked up
+ m_LastDigBlockZ(0),
m_State(csConnected),
m_ShouldCheckDownloaded(false),
m_NumExplosionsThisTick(0),
+ m_NumBlockChangeInteractionsThisTick(0),
m_UniqueID(0),
m_HasSentPlayerChunk(false),
m_Locale("en_GB")
diff --git a/src/DeadlockDetect.cpp b/src/DeadlockDetect.cpp
index f73a45555..7f703416c 100644
--- a/src/DeadlockDetect.cpp
+++ b/src/DeadlockDetect.cpp
@@ -21,7 +21,8 @@ const int CYCLE_MILLISECONDS = 100;
cDeadlockDetect::cDeadlockDetect(void) :
- super("DeadlockDetect")
+ super("DeadlockDetect"),
+ m_IntervalSec(1000)
{
}
@@ -136,6 +137,7 @@ void cDeadlockDetect::CheckWorldAge(const AString & a_WorldName, Int64 a_Age)
void cDeadlockDetect::DeadlockDetected(void)
{
+ LOGERROR("Deadlock detected, aborting the server");
ASSERT(!"Deadlock detected");
abort();
}
diff --git a/src/Generating/Caves.cpp b/src/Generating/Caves.cpp
index 6fc371958..71154dff9 100644
--- a/src/Generating/Caves.cpp
+++ b/src/Generating/Caves.cpp
@@ -166,6 +166,9 @@ cCaveTunnel::cCaveTunnel(
if ((a_BlockStartY <= 0) && (a_BlockEndY <= 0))
{
// Don't bother detailing this cave, it's under the world anyway
+ m_MinBlockX = m_MaxBlockX = 0;
+ m_MinBlockY = m_MaxBlockY = -1;
+ m_MinBlockZ = m_MaxBlockZ = 0;
return;
}
diff --git a/src/Generating/ChunkGenerator.cpp b/src/Generating/ChunkGenerator.cpp
index 3d5af152c..a1188f984 100644
--- a/src/Generating/ChunkGenerator.cpp
+++ b/src/Generating/ChunkGenerator.cpp
@@ -27,6 +27,7 @@ const unsigned int QUEUE_SKIP_LIMIT = 500;
cChunkGenerator::cChunkGenerator(void) :
super("cChunkGenerator"),
+ m_Seed(0), // Will be overwritten by the actual generator
m_Generator(NULL),
m_PluginInterface(NULL),
m_ChunkSink(NULL)
diff --git a/src/Generating/HeiGen.cpp b/src/Generating/HeiGen.cpp
index c3f3b38a9..79d529a6a 100644
--- a/src/Generating/HeiGen.cpp
+++ b/src/Generating/HeiGen.cpp
@@ -239,7 +239,13 @@ bool cHeiGenCache::GetHeightAt(int a_ChunkX, int a_ChunkZ, int a_RelX, int a_Rel
cHeiGenClassic::cHeiGenClassic(int a_Seed) :
m_Seed(a_Seed),
- m_Noise(a_Seed)
+ m_Noise(a_Seed),
+ m_HeightFreq1(1.0f),
+ m_HeightAmp1(1.0f),
+ m_HeightFreq2(0.5f),
+ m_HeightAmp2(0.5f),
+ m_HeightFreq3(0.1f),
+ m_HeightAmp3(0.1f)
{
}
diff --git a/src/HTTPServer/HTTPConnection.cpp b/src/HTTPServer/HTTPConnection.cpp
index b9c762e7c..bf46bb241 100644
--- a/src/HTTPServer/HTTPConnection.cpp
+++ b/src/HTTPServer/HTTPConnection.cpp
@@ -15,7 +15,8 @@
cHTTPConnection::cHTTPConnection(cHTTPServer & a_HTTPServer) :
m_HTTPServer(a_HTTPServer),
m_State(wcsRecvHeaders),
- m_CurrentRequest(NULL)
+ m_CurrentRequest(NULL),
+ m_CurrentRequestBodyRemaining(0)
{
// LOGD("HTTP: New connection at %p", this);
}
diff --git a/src/HTTPServer/HTTPFormParser.cpp b/src/HTTPServer/HTTPFormParser.cpp
index 9ddfb82f1..c50c6dcf2 100644
--- a/src/HTTPServer/HTTPFormParser.cpp
+++ b/src/HTTPServer/HTTPFormParser.cpp
@@ -15,7 +15,9 @@
cHTTPFormParser::cHTTPFormParser(cHTTPRequest & a_Request, cCallbacks & a_Callbacks) :
m_Callbacks(a_Callbacks),
- m_IsValid(true)
+ m_IsValid(true),
+ m_IsCurrentPartFile(false),
+ m_FileHasBeenAnnounced(false)
{
if (a_Request.GetMethod() == "GET")
{
@@ -55,7 +57,9 @@ cHTTPFormParser::cHTTPFormParser(cHTTPRequest & a_Request, cCallbacks & a_Callba
cHTTPFormParser::cHTTPFormParser(eKind a_Kind, const char * a_Data, size_t a_Size, cCallbacks & a_Callbacks) :
m_Callbacks(a_Callbacks),
m_Kind(a_Kind),
- m_IsValid(true)
+ m_IsValid(true),
+ m_IsCurrentPartFile(false),
+ m_FileHasBeenAnnounced(false)
{
Parse(a_Data, a_Size);
}
diff --git a/src/LightingThread.cpp b/src/LightingThread.cpp
index 3fbbee6b5..652b03e46 100644
--- a/src/LightingThread.cpp
+++ b/src/LightingThread.cpp
@@ -73,6 +73,8 @@ public:
HEIGHTTYPE * m_HeightMap; // 3x3 chunks of height map, organized as a single XZY blob of data (instead of 3x3 XZY blobs)
cReader(BLOCKTYPE * a_BlockTypes, HEIGHTTYPE * a_HeightMap) :
+ m_ReadingChunkX(0),
+ m_ReadingChunkZ(0),
m_MaxHeight(0),
m_BlockTypes(a_BlockTypes),
m_HeightMap(a_HeightMap)
@@ -89,7 +91,9 @@ public:
cLightingThread::cLightingThread(void) :
super("cLightingThread"),
- m_World(NULL)
+ m_World(NULL),
+ m_MaxHeight(0),
+ m_NumSeeds(0)
{
}
diff --git a/src/Noise.cpp b/src/Noise.cpp
index 507d05ea5..71e801f30 100644
--- a/src/Noise.cpp
+++ b/src/Noise.cpp
@@ -146,6 +146,8 @@ cCubicCell2D::cCubicCell2D(
) :
m_Noise(a_Noise),
m_WorkRnds(&m_Workspace1),
+ m_CurFloorX(0),
+ m_CurFloorY(0),
m_Array(a_Array),
m_SizeX(a_SizeX),
m_SizeY(a_SizeY),
@@ -300,6 +302,9 @@ cCubicCell3D::cCubicCell3D(
) :
m_Noise(a_Noise),
m_WorkRnds(&m_Workspace1),
+ m_CurFloorX(0),
+ m_CurFloorY(0),
+ m_CurFloorZ(0),
m_Array(a_Array),
m_SizeX(a_SizeX),
m_SizeY(a_SizeY),
diff --git a/src/PolarSSL++/SslContext.cpp b/src/PolarSSL++/SslContext.cpp
index c3074f197..482470c3a 100644
--- a/src/PolarSSL++/SslContext.cpp
+++ b/src/PolarSSL++/SslContext.cpp
@@ -16,6 +16,7 @@ cSslContext::cSslContext(void) :
m_IsValid(false),
m_HasHandshaken(false)
{
+ memset(&m_Ssl, 0, sizeof(m_Ssl));
}
diff --git a/src/Server.cpp b/src/Server.cpp
index 42ad133f1..cbb9fba4d 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -117,7 +117,9 @@ cServer::cServer(void) :
m_MaxPlayers(0),
m_bIsHardcore(false),
m_TickThread(*this),
- m_ShouldAuthenticate(false)
+ m_ShouldAuthenticate(false),
+ m_ShouldLoadOfflinePlayerData(false),
+ m_ShouldLoadNamedPlayerData(true)
{
}
diff --git a/src/WorldStorage/FastNBT.h b/src/WorldStorage/FastNBT.h
index 4ef72e379..ebf99103f 100644
--- a/src/WorldStorage/FastNBT.h
+++ b/src/WorldStorage/FastNBT.h
@@ -76,7 +76,9 @@ public:
cFastNBTTag(eTagType a_Type, int a_Parent) :
m_Type(a_Type),
+ m_NameStart(0),
m_NameLength(0),
+ m_DataStart(0),
m_DataLength(0),
m_Parent(a_Parent),
m_PrevSibling(-1),
@@ -88,7 +90,9 @@ public:
cFastNBTTag(eTagType a_Type, int a_Parent, int a_PrevSibling) :
m_Type(a_Type),
+ m_NameStart(0),
m_NameLength(0),
+ m_DataStart(0),
m_DataLength(0),
m_Parent(a_Parent),
m_PrevSibling(a_PrevSibling),