Fixed cProjectileEntity double destroy bug (#3397)
This commit is contained in:
parent
1e8cae6415
commit
4e33569110
@ -413,6 +413,10 @@ void cProjectileEntity::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a
|
|||||||
);
|
);
|
||||||
|
|
||||||
OnHitEntity(*(EntityCollisionCallback.GetHitEntity()), HitPos);
|
OnHitEntity(*(EntityCollisionCallback.GetHitEntity()), HitPos);
|
||||||
|
if (!IsTicking())
|
||||||
|
{
|
||||||
|
return; // We were destroyed by an override of OnHitEntity
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// TODO: Test the entities in the neighboring chunks, too
|
// TODO: Test the entities in the neighboring chunks, too
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user