summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-09 01:57:22 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-09 01:57:22 +0100
commitc68bdaf34beee368100e6697fc3d87a711dba6b7 (patch)
treec7891201022913cff7e955057c1cdf900fedc963 /src
parentMerge remote-tracking branch 'origin/master' into playerimprovements (diff)
downloadcuberite-c68bdaf34beee368100e6697fc3d87a711dba6b7.tar
cuberite-c68bdaf34beee368100e6697fc3d87a711dba6b7.tar.gz
cuberite-c68bdaf34beee368100e6697fc3d87a711dba6b7.tar.bz2
cuberite-c68bdaf34beee368100e6697fc3d87a711dba6b7.tar.lz
cuberite-c68bdaf34beee368100e6697fc3d87a711dba6b7.tar.xz
cuberite-c68bdaf34beee368100e6697fc3d87a711dba6b7.tar.zst
cuberite-c68bdaf34beee368100e6697fc3d87a711dba6b7.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockButton.h2
-rw-r--r--src/Blocks/BlockLever.h2
-rw-r--r--src/Blocks/BlockTrapdoor.h2
-rw-r--r--src/Generating/StructGen.cpp9
-rw-r--r--src/MobSpawner.cpp2
-rw-r--r--src/World.cpp2
-rw-r--r--src/WorldStorage/ScoreboardSerializer.cpp4
7 files changed, 6 insertions, 17 deletions
diff --git a/src/Blocks/BlockButton.h b/src/Blocks/BlockButton.h
index f2a2885be..ca6850ced 100644
--- a/src/Blocks/BlockButton.h
+++ b/src/Blocks/BlockButton.h
@@ -88,7 +88,7 @@ public:
default:
{
ASSERT(!"Unhandled block meta!");
- return 0;
+ return BLOCK_FACE_NONE;
}
}
}
diff --git a/src/Blocks/BlockLever.h b/src/Blocks/BlockLever.h
index 8b4126873..48c7e774b 100644
--- a/src/Blocks/BlockLever.h
+++ b/src/Blocks/BlockLever.h
@@ -88,7 +88,7 @@ public:
default:
{
ASSERT(!"Unhandled block meta!");
- return 0;
+ return BLOCK_FACE_NONE;
}
}
}
diff --git a/src/Blocks/BlockTrapdoor.h b/src/Blocks/BlockTrapdoor.h
index 47b51db16..08fc28327 100644
--- a/src/Blocks/BlockTrapdoor.h
+++ b/src/Blocks/BlockTrapdoor.h
@@ -84,7 +84,7 @@ public:
default:
{
ASSERT(!"Unhandled block meta!");
- return 0;
+ return BLOCK_FACE_NONE;
}
}
}
diff --git a/src/Generating/StructGen.cpp b/src/Generating/StructGen.cpp
index da6227801..4efcf92f0 100644
--- a/src/Generating/StructGen.cpp
+++ b/src/Generating/StructGen.cpp
@@ -60,15 +60,6 @@ template <typename T> T Clamp(T a_Value, T a_Min, T a_Max)
-static bool SortTreeBlocks(const sSetBlock & a_First, const sSetBlock & a_Second)
-{
- return (a_First.BlockType == E_BLOCK_LOG) && (a_Second.BlockType != E_BLOCK_LOG);
-}
-
-
-
-
-
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cStructGenTrees:
diff --git a/src/MobSpawner.cpp b/src/MobSpawner.cpp
index 4d0b2777b..c86268e63 100644
--- a/src/MobSpawner.cpp
+++ b/src/MobSpawner.cpp
@@ -126,7 +126,7 @@ cMonster::eType cMobSpawner::ChooseMobType(EMCSBiome a_Biome)
bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, cMonster::eType a_MobType, EMCSBiome a_Biome)
{
- BLOCKTYPE TargetBlock;
+ BLOCKTYPE TargetBlock = E_BLOCK_AIR;
if (m_AllowedTypes.find(a_MobType) != m_AllowedTypes.end() && a_Chunk->UnboundedRelGetBlockType(a_RelX, a_RelY, a_RelZ, TargetBlock))
{
NIBBLETYPE BlockLight = a_Chunk->GetBlockLight(a_RelX, a_RelY, a_RelZ);
diff --git a/src/World.cpp b/src/World.cpp
index d2523b0a5..662a9a4b8 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -251,10 +251,8 @@ cWorld::cWorld(const AString & a_WorldName) :
m_Scoreboard(this),
m_GeneratorCallbacks(*this),
m_TickThread(*this),
- m_Scoreboard(this),
m_bCommandBlocksEnabled(false),
m_bUseChatPrefixes(true)
- m_TickThread(*this)
{
LOGD("cWorld::cWorld(\"%s\")", a_WorldName.c_str());
diff --git a/src/WorldStorage/ScoreboardSerializer.cpp b/src/WorldStorage/ScoreboardSerializer.cpp
index c65e13f98..9b8b661c4 100644
--- a/src/WorldStorage/ScoreboardSerializer.cpp
+++ b/src/WorldStorage/ScoreboardSerializer.cpp
@@ -242,7 +242,7 @@ bool cScoreboardSerializer::LoadScoreboardFromNBT(const cParsedNBT & a_NBT)
{
AString Name, ObjectiveName;
- cObjective::Score Score;
+ cObjective::Score Score = 0;
int CurrLine = a_NBT.FindChildByName(Child, "Score");
if (CurrLine >= 0)
@@ -280,7 +280,7 @@ bool cScoreboardSerializer::LoadScoreboardFromNBT(const cParsedNBT & a_NBT)
{
AString Name, DisplayName, Prefix, Suffix;
- bool AllowsFriendlyFire, CanSeeFriendlyInvisible;
+ bool AllowsFriendlyFire = false, CanSeeFriendlyInvisible = false;
int CurrLine = a_NBT.FindChildByName(Child, "Name");
if (CurrLine >= 0)