summaryrefslogtreecommitdiffstats
path: root/src/Entities/ArrowEntity.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-05-28 16:39:59 +0200
committerHowaner <franzi.moos@googlemail.com>2014-05-28 16:39:59 +0200
commite7a7c45c3681e90cb9ab13d16935aae9860f1077 (patch)
tree8f00748405253e045acab59c7426c17b101eebe1 /src/Entities/ArrowEntity.cpp
parentFix Y-Position from arrow entity. (diff)
downloadcuberite-e7a7c45c3681e90cb9ab13d16935aae9860f1077.tar
cuberite-e7a7c45c3681e90cb9ab13d16935aae9860f1077.tar.gz
cuberite-e7a7c45c3681e90cb9ab13d16935aae9860f1077.tar.bz2
cuberite-e7a7c45c3681e90cb9ab13d16935aae9860f1077.tar.lz
cuberite-e7a7c45c3681e90cb9ab13d16935aae9860f1077.tar.xz
cuberite-e7a7c45c3681e90cb9ab13d16935aae9860f1077.tar.zst
cuberite-e7a7c45c3681e90cb9ab13d16935aae9860f1077.zip
Diffstat (limited to 'src/Entities/ArrowEntity.cpp')
-rw-r--r--src/Entities/ArrowEntity.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp
index fbc535e63..769750bd4 100644
--- a/src/Entities/ArrowEntity.cpp
+++ b/src/Entities/ArrowEntity.cpp
@@ -19,7 +19,10 @@ cArrowEntity::cArrowEntity(cEntity * a_Creator, double a_X, double a_Y, double a
m_bIsCollected(false),
m_HitBlockPos(Vector3i(0, 0, 0))
{
- SetPosY(GetPosY() + a_Creator->GetHeight() - 0.1000000014901161);
+ if (a_Creator != NULL)
+ {
+ SetPosY(GetPosY() + a_Creator->GetHeight() - 0.1000000014901161);
+ }
SetSpeed(a_Speed);
SetMass(0.1);
SetYawFromSpeed();