Fixed an assert in cMonster

master
madmaxoft 2013-10-22 17:54:23 +02:00
parent 76ed2f441a
commit 4cf0862c12
1 changed files with 2 additions and 2 deletions

View File

@ -718,8 +718,8 @@ void cMonster::HandleDaylightBurning(cChunk & a_Chunk)
return;
}
int RelX = (int)floor(GetPosX()) - a_Chunk.GetPosX() * cChunkDef::Width;
int RelZ = (int)floor(GetPosZ()) - a_Chunk.GetPosZ() * cChunkDef::Width;
int RelX = (int)floor(GetPosX()) - GetChunkX() * cChunkDef::Width;
int RelZ = (int)floor(GetPosZ()) - GetChunkZ() * cChunkDef::Width;
if (
(a_Chunk.GetSkyLight(RelX, RelY, RelZ) == 15) && // In the daylight
(a_Chunk.GetBlock(RelX, RelY, RelZ) != E_BLOCK_SOULSAND) && // Not on soulsand