From b99fc063554ff9f778d8944353913667e620c9e4 Mon Sep 17 00:00:00 2001 From: Bixilon Date: Tue, 8 Jun 2021 00:15:33 +0200 Subject: [PATCH] particles: fix velocity bug in SuspendParticle --- .../types/render/texture/simple/suspend/SuspendParticle.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/bixilon/minosoft/gui/rendering/particle/types/render/texture/simple/suspend/SuspendParticle.kt b/src/main/java/de/bixilon/minosoft/gui/rendering/particle/types/render/texture/simple/suspend/SuspendParticle.kt index 8efda084f..e601b32da 100644 --- a/src/main/java/de/bixilon/minosoft/gui/rendering/particle/types/render/texture/simple/suspend/SuspendParticle.kt +++ b/src/main/java/de/bixilon/minosoft/gui/rendering/particle/types/render/texture/simple/suspend/SuspendParticle.kt @@ -26,13 +26,16 @@ abstract class SuspendParticle(connection: PlayConnection, position: Vec3d, velo this.color = (random.nextFloat() * 0.1f + 0.2f).asGray() spacing = Vec3(0.2f) super.scale *= random.nextFloat() * 0.6f + 0.5f - velocity *= 0.019999999552965164 + this.velocity *= 0.019999999552965164 maxAge = (20 / (random.nextFloat() * 0.8f + 0.2f)).toInt() movement = false } override fun realTick() { super.realTick() + if (dead) { + return + } position += velocity velocity *= 0.99f