diff --git a/Minecraft.World/Entities/Entity.cpp b/Minecraft.World/Entities/Entity.cpp index 216e49beb..007d82209 100644 --- a/Minecraft.World/Entities/Entity.cpp +++ b/Minecraft.World/Entities/Entity.cpp @@ -885,8 +885,8 @@ void Entity::move(double xa, double ya, double za, checkInsideTiles(); bool water = isInWaterOrRain(); - const AABB& shrunk = bb.shrink(0.001, 0.001, 0.001); - if (level->containsFireTile(&bb)) { + AABB shrunk = bb.shrink(0.001, 0.001, 0.001); + if (level->containsFireTile(&shrunk)) { burn(1); if (!water) { onFire++; diff --git a/Minecraft.World/Entities/Mobs/Ghast.cpp b/Minecraft.World/Entities/Mobs/Ghast.cpp index e6a36730c..7808df292 100644 --- a/Minecraft.World/Entities/Mobs/Ghast.cpp +++ b/Minecraft.World/Entities/Mobs/Ghast.cpp @@ -169,10 +169,11 @@ bool Ghast::canReach(double xt, double yt, double zt, double dist) { double xd = (xTarget - x) / dist; double yd = (yTarget - y) / dist; double zd = (zTarget - z) / dist; + AABB probe = bb; for (int d = 1; d < dist; d++) { - bb.move(xd, yd, zd); - if (!level->getCubes(shared_from_this(), &bb)->empty()) return false; + probe = probe.move(xd, yd, zd); + if (!level->getCubes(shared_from_this(), &probe)->empty()) return false; } return true;