summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-10 16:55:29 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-10 16:55:29 +0200
commitc90eb4ae65bceafb05723b80f45caccace265141 (patch)
tree8f655c5385132798693249e5204117bedd8b5eda
parent5df5b2d5f9645df0837c9f134eca992c4b734280 (diff)
downloadRustAndDust-c90eb4ae65bceafb05723b80f45caccace265141.zip
RustAndDust-c90eb4ae65bceafb05723b80f45caccace265141.tar.gz
TankFireAnimation: fix bad region init on animation second usage
-rw-r--r--TODO1
-rw-r--r--core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java6
2 files changed, 1 insertions, 6 deletions
diff --git a/TODO b/TODO
index b62fd8e..34b81e8 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,4 @@
FIX:
- - fix shoot animations, quit -> resume
- fix bug in Msg: changing position on stacked labels does not work
TODO:
diff --git a/core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java b/core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java
index 656ae51..890fc59 100644
--- a/core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java
+++ b/core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java
@@ -22,8 +22,6 @@ public class TankFireAnimation implements Disposable, Animation, Pool.Poolable
private static final float EXPLOSION_FRAME_DURATION = 0.07f;
private TextureRegion fireRegion;
- private int _w;
- private int _h;
private float fire_a;
private float fire_x;
private float fire_y;
@@ -70,8 +68,6 @@ public class TankFireAnimation implements Disposable, Animation, Pool.Poolable
public TankFireAnimation()
{
this.fireRegion = new TextureRegion(FireAnimation.tankFire.frames[0]);
- this._w = this.fireRegion.getRegionWidth();
- this._h = this.fireRegion.getRegionHeight();
}
private void set(float volume, Moveable m, float x0, float y0, float x1, float y1, float halfWidth)
@@ -110,7 +106,7 @@ public class TankFireAnimation implements Disposable, Animation, Pool.Poolable
this.end_time = (hit_time + explosion_duration);
// fire vars
- this.fireRegion.setRegion(0, 0, _w, _h);
+ this.fireRegion.setRegion(FireAnimation.tankFire.frames[0]);
this.fire_a = a;
this.fire_x = x0;
this.fire_y = y0;