From 4017d369b1fb0bdbc12f4e4bcbdcd450093c1b38 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Tue, 4 Nov 2014 21:06:36 +0100 Subject: [PATCH] Make sure Explosions cleanup after themselves. Apparrently, == 0 was not enough. --- .../teamteamteam/spacescooter/entity/explosion/Explosion.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/teamteamteam/spacescooter/entity/explosion/Explosion.java b/src/de/teamteamteam/spacescooter/entity/explosion/Explosion.java index 7fd1a4e..12ea650 100644 --- a/src/de/teamteamteam/spacescooter/entity/explosion/Explosion.java +++ b/src/de/teamteamteam/spacescooter/entity/explosion/Explosion.java @@ -58,7 +58,7 @@ public class Explosion extends Entity { */ public void update() { this.timeToLive--; - if(this.timeToLive == 0) this.remove(); + if(this.timeToLive <= 0) this.remove(); if(this.count > 0 && this.timeToLive % this.count == 0) { new Explosion(this.getX() + (int) (this.width * this.random.nextDouble()), this.getY() + (int) (this.height * this.random.nextDouble())); this.count--;