summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-10-09 17:22:34 +0200
committerMattes D <github@xoft.cz>2016-10-09 17:22:34 +0200
commit4e33569110d9a4e71b1d2fa4ea674225c8d36b88 (patch)
tree3b8d24d4b4bb87b08952d91fc739461fb75d1d06 /src
parentcChunk::SetAlwaysTicked implies cChunk::stay (#3361) (diff)
downloadcuberite-4e33569110d9a4e71b1d2fa4ea674225c8d36b88.tar
cuberite-4e33569110d9a4e71b1d2fa4ea674225c8d36b88.tar.gz
cuberite-4e33569110d9a4e71b1d2fa4ea674225c8d36b88.tar.bz2
cuberite-4e33569110d9a4e71b1d2fa4ea674225c8d36b88.tar.lz
cuberite-4e33569110d9a4e71b1d2fa4ea674225c8d36b88.tar.xz
cuberite-4e33569110d9a4e71b1d2fa4ea674225c8d36b88.tar.zst
cuberite-4e33569110d9a4e71b1d2fa4ea674225c8d36b88.zip
Diffstat (limited to 'src')
-rw-r--r--src/Entities/ProjectileEntity.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index 2f90a56cb..fb7da85a1 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -413,6 +413,10 @@ void cProjectileEntity::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a
);
OnHitEntity(*(EntityCollisionCallback.GetHitEntity()), HitPos);
+ if (!IsTicking())
+ {
+ return; // We were destroyed by an override of OnHitEntity
+ }
}
// TODO: Test the entities in the neighboring chunks, too