summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-22 17:54:23 +0200
committermadmaxoft <github@xoft.cz>2013-10-22 17:54:23 +0200
commit4cf0862c12346b9f3e26e86784bbd5c5d61e0590 (patch)
treec69a206c8f72204f84b7d0cf9908548e010542d8
parentImplemented UnboundedRel BlockLight and SkyLight. (diff)
downloadcuberite-4cf0862c12346b9f3e26e86784bbd5c5d61e0590.tar
cuberite-4cf0862c12346b9f3e26e86784bbd5c5d61e0590.tar.gz
cuberite-4cf0862c12346b9f3e26e86784bbd5c5d61e0590.tar.bz2
cuberite-4cf0862c12346b9f3e26e86784bbd5c5d61e0590.tar.lz
cuberite-4cf0862c12346b9f3e26e86784bbd5c5d61e0590.tar.xz
cuberite-4cf0862c12346b9f3e26e86784bbd5c5d61e0590.tar.zst
cuberite-4cf0862c12346b9f3e26e86784bbd5c5d61e0590.zip
-rw-r--r--source/Mobs/Monster.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/Mobs/Monster.cpp b/source/Mobs/Monster.cpp
index 599aa9cfc..7e35b97f1 100644
--- a/source/Mobs/Monster.cpp
+++ b/source/Mobs/Monster.cpp
@@ -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