Make sure Explosions cleanup after themselves.

Apparrently, == 0 was not enough.
This commit is contained in:
Jan Philipp Timme 2014-11-04 21:06:36 +01:00
parent 48e3ac275c
commit 4017d369b1
1 changed files with 1 additions and 1 deletions

View File

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