particles: fix velocity bug in SuspendParticle

This commit is contained in:
Bixilon 2021-06-08 00:15:33 +02:00 committed by Lukas
parent e52ce868b2
commit b99fc06355

View File

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