diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-18 22:20:16 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-18 22:20:16 +0100 |
commit | 5fec5d6c036198472c92f468e216256562b05e0b (patch) | |
tree | ab342bfb101cf94fa029872df73eafbe4a250800 | |
parent | c8ed4e30b06b4d85cc9a0a2d80c08a40c61a6697 (diff) | |
download | RustAndDust-5fec5d6c036198472c92f468e216256562b05e0b.zip RustAndDust-5fec5d6c036198472c92f468e216256562b05e0b.tar.gz |
Board: getSetPawnOntoAnimation() does nothing if destination Tile is OffMap
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Board.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index ffc26cc..f95375c 100644 --- a/core/src/ch/asynk/tankontank/engine/Board.java +++ b/core/src/ch/asynk/tankontank/engine/Board.java @@ -423,7 +423,9 @@ public abstract class Board implements Disposable, Animation return RunnableAnimation.get(pawn, new Runnable() { @Override public void run() { - setPawnOnto(pawn, pawn.move.to, pawn.move.orientation); + Tile to = pawn.move.to; + if (!to.isOffMap()) + setPawnOnto(pawn, to, pawn.move.orientation); } }); } |