summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/WSSAnvil.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-24 09:57:12 +0100
committermadmaxoft <github@xoft.cz>2014-01-24 09:57:12 +0100
commitb02940209d64e4239ac6c0e7c8cb4f1d8280b7aa (patch)
treeb01d4dd08322ad26fbd9014d31de0efcf0cdbf76 /src/WorldStorage/WSSAnvil.cpp
parentAPIDump: Fixed indent after merge. (diff)
downloadcuberite-b02940209d64e4239ac6c0e7c8cb4f1d8280b7aa.tar
cuberite-b02940209d64e4239ac6c0e7c8cb4f1d8280b7aa.tar.gz
cuberite-b02940209d64e4239ac6c0e7c8cb4f1d8280b7aa.tar.bz2
cuberite-b02940209d64e4239ac6c0e7c8cb4f1d8280b7aa.tar.lz
cuberite-b02940209d64e4239ac6c0e7c8cb4f1d8280b7aa.tar.xz
cuberite-b02940209d64e4239ac6c0e7c8cb4f1d8280b7aa.tar.zst
cuberite-b02940209d64e4239ac6c0e7c8cb4f1d8280b7aa.zip
Diffstat (limited to '')
-rw-r--r--src/WorldStorage/WSSAnvil.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 8be6372e2..e2a882f65 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -1926,14 +1926,19 @@ bool cWSSAnvil::LoadEntityBaseFromNBT(cEntity & a_Entity, const cParsedNBT & a_N
double Speed[3];
if (!LoadDoublesListFromNBT(Speed, 3, a_NBT, a_NBT.FindChildByName(a_TagIdx, "Motion")))
{
- return false;
+ // Provide default speed:
+ Speed[0] = 0;
+ Speed[1] = 0;
+ Speed[2] = 0;
}
a_Entity.SetSpeed(Speed[0], Speed[1], Speed[2]);
double Rotation[3];
if (!LoadDoublesListFromNBT(Rotation, 2, a_NBT, a_NBT.FindChildByName(a_TagIdx, "Rotation")))
{
- return false;
+ // Provide default rotation:
+ Rotation[0] = 0;
+ Rotation[1] = 0;
}
a_Entity.SetYaw(Rotation[0]);
a_Entity.SetRoll(Rotation[1]);