1
0

Fixed cProjectileEntity double destroy bug (#3397)

This commit is contained in:
LogicParrot 2016-10-09 18:22:34 +03:00 committed by Mattes D
parent 1e8cae6415
commit 4e33569110

View File

@ -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