mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-13 06:28:17 +00:00
refactor: remove heap-allocated AABBs
This commit is contained in:
@@ -52,8 +52,8 @@ void PlayerCloudParticle::tick() {
|
||||
zd *= 0.96f;
|
||||
std::shared_ptr<Player> p = level->getNearestPlayer(shared_from_this(), 2);
|
||||
if (p != NULL) {
|
||||
if (y > p->bb->y0) {
|
||||
y += (p->bb->y0 - y) * 0.2;
|
||||
if (y > p->bb.y0) {
|
||||
y += (p->bb.y0 - y) * 0.2;
|
||||
yd += (p->yd - yd) * 0.2;
|
||||
setPos(x, y, z);
|
||||
}
|
||||
@@ -63,4 +63,4 @@ void PlayerCloudParticle::tick() {
|
||||
xd *= 0.7f;
|
||||
zd *= 0.7f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user