summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java2
1 files changed, 1 insertions, 1 deletions
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 8584a79..ef23a6b 100644
--- a/core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java
+++ b/core/src/ch/asynk/rustanddust/engine/gfx/animations/TankFireAnimation.java
@@ -79,7 +79,7 @@ public class TankFireAnimation implements Disposable, Animation, Pool.Poolable
this.aim_r = (float) (Math.toDegrees(Math.atan2((y0 - y1), (x0 - x1))));
// fire geometry
- y0 -= (FireAnimation.tankFire.height / 2.0f);
+ y0 += (((Math.abs(aim_r) > 90) ? 1 : -1) * (FireAnimation.tankFire.height / 2.0f));
x1 += ((SHOT_SCATTERING * FireAnimation.random.nextFloat()) - (SHOT_SCATTERING / 2f));
y1 += ((SHOT_SCATTERING * FireAnimation.random.nextFloat()) - (SHOT_SCATTERING / 2f));