1
0

Entities now bail out of ticks if destroyed (#3363)

This commit is contained in:
LogicParrot
2016-09-03 14:31:27 +03:00
committed by GitHub
parent 5625598afa
commit 90be4e7efd
22 changed files with 111 additions and 1 deletions

View File

@@ -30,6 +30,11 @@ void cSnowGolem::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cSnowGolem::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
return;
}
if (IsBiomeNoDownfall(m_World->GetBiomeAt(POSX_TOINT, POSZ_TOINT)))
{
TakeDamage(*this);