summaryrefslogtreecommitdiffstats
path: root/src/Generating/Trees.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-12 08:51:07 +0200
committerMattes D <github@xoft.cz>2014-05-12 08:51:07 +0200
commit702643d7e65d73a94b1ccfcdd21271f320a7e0a0 (patch)
tree0f1f08f4c0c0be97f42d793af85daec1bedf89a1 /src/Generating/Trees.cpp
parentMerge pull request #972 from mc-server/SslWebAdmin (diff)
parentMore switch warnings. (diff)
downloadcuberite-702643d7e65d73a94b1ccfcdd21271f320a7e0a0.tar
cuberite-702643d7e65d73a94b1ccfcdd21271f320a7e0a0.tar.gz
cuberite-702643d7e65d73a94b1ccfcdd21271f320a7e0a0.tar.bz2
cuberite-702643d7e65d73a94b1ccfcdd21271f320a7e0a0.tar.lz
cuberite-702643d7e65d73a94b1ccfcdd21271f320a7e0a0.tar.xz
cuberite-702643d7e65d73a94b1ccfcdd21271f320a7e0a0.tar.zst
cuberite-702643d7e65d73a94b1ccfcdd21271f320a7e0a0.zip
Diffstat (limited to 'src/Generating/Trees.cpp')
-rw-r--r--src/Generating/Trees.cpp34
1 files changed, 27 insertions, 7 deletions
diff --git a/src/Generating/Trees.cpp b/src/Generating/Trees.cpp
index 4f1553c36..522f45148 100644
--- a/src/Generating/Trees.cpp
+++ b/src/Generating/Trees.cpp
@@ -174,7 +174,7 @@ void GetTreeImageByBiome(int a_BlockX, int a_BlockY, int a_BlockZ, cNoise & a_No
{
GetBirchTreeImage(a_BlockX, a_BlockY, a_BlockZ, a_Noise, a_Seq, a_LogBlocks, a_OtherBlocks);
}
- break;
+ return;
}
case biTaiga:
@@ -184,14 +184,14 @@ void GetTreeImageByBiome(int a_BlockX, int a_BlockY, int a_BlockZ, cNoise & a_No
{
// Conifers
GetConiferTreeImage(a_BlockX, a_BlockY, a_BlockZ, a_Noise, a_Seq, a_LogBlocks, a_OtherBlocks);
- break;
+ return;
}
case biSwampland:
{
// Swamp trees:
GetSwampTreeImage(a_BlockX, a_BlockY, a_BlockZ, a_Noise, a_Seq, a_LogBlocks, a_OtherBlocks);
- break;
+ return;
}
case biJungle:
@@ -207,21 +207,21 @@ void GetTreeImageByBiome(int a_BlockX, int a_BlockY, int a_BlockZ, cNoise & a_No
{
GetJungleTreeImage(a_BlockX, a_BlockY, a_BlockZ, a_Noise, a_Seq, a_LogBlocks, a_OtherBlocks);
}
- break;
+ return;
}
case biBirchForest:
case biBirchForestHills:
{
GetBirchTreeImage(a_BlockX, a_BlockY, a_BlockZ, a_Noise, a_Seq, a_LogBlocks, a_OtherBlocks);
- break;
+ return;
}
case biBirchForestM:
case biBirchForestHillsM:
{
GetTallBirchTreeImage(a_BlockX, a_BlockY, a_BlockZ, a_Noise, a_Seq, a_LogBlocks, a_OtherBlocks);
- break;
+ return;
}
case biRoofedForest:
@@ -257,9 +257,29 @@ void GetTreeImageByBiome(int a_BlockX, int a_BlockY, int a_BlockZ, cNoise & a_No
{
// TODO: These need their special trees
GetBirchTreeImage(a_BlockX, a_BlockY, a_BlockZ, a_Noise, a_Seq, a_LogBlocks, a_OtherBlocks);
- break;
+ return;
+ }
+
+ case biDesert:
+ case biDesertHills:
+ case biRiver:
+ case biBeach:
+ case biHell:
+ case biSky:
+ case biOcean:
+ case biFrozenOcean:
+ case biFrozenRiver:
+ case biVariant:
+ case biNumBiomes:
+ case biNumVariantBiomes:
+ case biInvalidBiome:
+ {
+ // These biomes have no trees, or are non-biome members of the enum.
+ return;
}
}
+
+ ASSERT(!"Invalid biome type!");
}