summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-07 17:43:59 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-07 17:43:59 +0200
commita4582632c685e146bfebb03ce10bf2a0082ae73a (patch)
tree1880babf4fe963af7355d8ba13cf90cc5fd5858e /core/src/ch
parent398134a2dadc74e8f50a471813c3672c05a6a536 (diff)
downloadRustAndDust-a4582632c685e146bfebb03ce10bf2a0082ae73a.zip
RustAndDust-a4582632c685e146bfebb03ce10bf2a0082ae73a.tar.gz
Map4Orders: fix unit orientation on replay ENTER order
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/rustanddust/game/map/Map4Orders.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java
index 05cc569..c30e6bd 100644
--- a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java
+++ b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java
@@ -287,8 +287,11 @@ public abstract class Map4Orders extends Map3Animations
break;
case ENTER:
claim(unit, move.from);
- if (order.replay)
- unit.setOnTile(move.from, Orientation.NORTH.r());
+ if (order.replay) {
+ Orientation entry = findBestEntry(unit, move.from, unit.entryZone.allowedMoves);
+ // Hex from = (Hex) getAdjTileAt(move.from, entry);
+ unit.setOnTile(move.from, entry.opposite().r());
+ }
playMoveSound(unit);
moveUnit(unit, move, this, order.replay);
break;