summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-11-29 12:05:35 +0100
committerHowaner <franzi.moos@googlemail.com>2014-11-29 12:05:35 +0100
commit648fee1a087cb97da9a4646d72ffc590e7837a67 (patch)
treeeb55b68428a303089bc1120e9c3593542059f18e /src/WorldStorage
parentFinished mob spawner implementation. (diff)
parentMerge pull request #1619 from mc-server/WarningFixes (diff)
downloadcuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.tar
cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.tar.gz
cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.tar.bz2
cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.tar.lz
cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.tar.xz
cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.tar.zst
cuberite-648fee1a087cb97da9a4646d72ffc590e7837a67.zip
Diffstat (limited to 'src/WorldStorage')
-rw-r--r--src/WorldStorage/WSSAnvil.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 451f20ca5..4520751c7 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -1857,9 +1857,10 @@ void cWSSAnvil::LoadArrowFromNBT(cEntityList & a_Entities, const cParsedNBT & a_
int InBlockZIdx = a_NBT.FindChildByName(a_TagIdx, "zTile");
if ((InBlockXIdx > 0) && (InBlockYIdx > 0) && (InBlockZIdx > 0))
{
- if (a_NBT.GetType(InBlockXIdx) == a_NBT.GetType(InBlockYIdx) == a_NBT.GetType(InBlockZIdx))
+ eTagType typeX = a_NBT.GetType(InBlockXIdx);
+ if ((typeX == a_NBT.GetType(InBlockYIdx)) && (typeX == a_NBT.GetType(InBlockZIdx)))
{
- switch (a_NBT.GetType(InBlockXIdx))
+ switch (typeX)
{
case TAG_Int:
{
@@ -1873,6 +1874,11 @@ void cWSSAnvil::LoadArrowFromNBT(cEntityList & a_Entities, const cParsedNBT & a_
Arrow->SetBlockHit(Vector3i((int)a_NBT.GetShort(InBlockXIdx), (int)a_NBT.GetShort(InBlockYIdx), (int)a_NBT.GetShort(InBlockZIdx)));
break;
}
+ default:
+ {
+ // No hit block, the arrow is still flying?
+ break;
+ }
}
}
}