1
0
Fork 0

Fixed failed assertation

This was caused by a monster with a negative Y-axis.
Fixes #2336
This commit is contained in:
bibo38 2015-09-05 22:02:15 +02:00
parent 47604cd914
commit 19b65ce357
1 changed files with 22 additions and 19 deletions

View File

@ -451,6 +451,8 @@ void cMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
m_Target = nullptr;
}
if (GetPosY() >= 0)
{
// Process the undead burning in daylight.
HandleDaylightBurning(*Chunk, WouldBurnAt(GetPosition(), *Chunk));
if (TickPathFinding(*Chunk))
@ -474,6 +476,7 @@ void cMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
MoveToWayPoint(*Chunk);
}
}
}
SetPitchAndYawFromDestination();
HandleFalling();