refactor: remove heap-allocated AABBs

This commit is contained in:
orng
2026-03-28 02:58:56 -05:00
parent e48a05bb8f
commit 7101d03c6a
88 changed files with 353 additions and 387 deletions

View File

@@ -34,7 +34,7 @@ void FlyingMob::travel(float xa, float ya) {
float friction = 0.91f;
if (onGround) {
friction = 0.6f * 0.91f;
int t = level->getTile(Mth::floor(x), Mth::floor(bb->y0) - 1,
int t = level->getTile(Mth::floor(x), Mth::floor(bb.y0) - 1,
Mth::floor(z));
if (t > 0) {
friction = Tile::tiles[t]->friction * 0.91f;
@@ -48,7 +48,7 @@ void FlyingMob::travel(float xa, float ya) {
friction = 0.91f;
if (onGround) {
friction = 0.6f * 0.91f;
int t = level->getTile(Mth::floor(x), Mth::floor(bb->y0) - 1,
int t = level->getTile(Mth::floor(x), Mth::floor(bb.y0) - 1,
Mth::floor(z));
if (t > 0) {
friction = Tile::tiles[t]->friction * 0.91f;
@@ -70,4 +70,4 @@ void FlyingMob::travel(float xa, float ya) {
walkAnimPos += walkAnimSpeed;
}
bool FlyingMob::onLadder() { return false; }
bool FlyingMob::onLadder() { return false; }