Correct world height validations.
Unify the way we test block above the current one (Height - 1 instead of a_RelY + 1). Allow generation of world of flat height = 255
This commit is contained in:
@@ -135,7 +135,7 @@ void cMonster::TickPathFinding()
|
||||
{ 0, -1},
|
||||
} ;
|
||||
|
||||
if ((PosY - 1 < 0) || (PosY + 2 > cChunkDef::Height) /* PosY + 1 will never be true if PosY + 2 is not */)
|
||||
if ((PosY - 1 < 0) || (PosY + 2 >= cChunkDef::Height) /* PosY + 1 will never be true if PosY + 2 is not */)
|
||||
{
|
||||
// Too low/high, can't really do anything
|
||||
FinishPathFinding();
|
||||
|
||||
Reference in New Issue
Block a user