fix: restore ghast reach checks and fire collision bounds after AABB refactor

This commit is contained in:
MatthewBeshay 2026-03-28 20:29:12 +11:00
parent 8cbdb636aa
commit c12f32f637
2 changed files with 5 additions and 4 deletions

View file

@ -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++;

View file

@ -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;