summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index 8142fab..ea1fb1c 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -353,7 +353,7 @@ public abstract class Board implements Disposable
if ((p == pawn) || !p.canAttack()) continue;
if (from == null)
from = gridPoint2Pool.obtain();
- getHexAt(p.getPosition(), from);
+ getHexAt(p.getCenter(), from);
if (searchBoard.canAttack(p, from.x, from.y, hex.x, hex.y)) {
assists.add(from);
from = null;
@@ -584,6 +584,12 @@ public abstract class Board implements Disposable
return getHexAt(null, v.x, v.y);
}
+ public GridPoint2 getHexAt(Vector2 v, GridPoint2 hex)
+ {
+ if (v == null) return null;
+ return getHexAt(hex, v.x, v.y);
+ }
+
public GridPoint2 getHexAt(Vector3 v)
{
if (v == null) return null;