summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/Tile.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/Tile.java b/core/src/ch/asynk/rustanddust/engine/Tile.java
index 63ff193..c865b31 100644
--- a/core/src/ch/asynk/rustanddust/engine/Tile.java
+++ b/core/src/ch/asynk/rustanddust/engine/Tile.java
@@ -140,16 +140,20 @@ public abstract class Tile implements Drawable, Disposable, Iterable<Pawn>
public boolean enableOverlay(int i, boolean enable)
{
- overlays.enable(i, enable);
- if (enable) return true;
+ if (i >= 0) {
+ overlays.enable(i, enable);
+ if (enable) return true;
+ }
return mustBeDrawn();
}
public boolean enableOverlay(int i, boolean enable, float r)
{
- overlays.enable(i, enable);
- overlays.rotate(i, r);
- if (enable) return true;
+ if (i >= 0) {
+ overlays.enable(i, enable);
+ overlays.rotate(i, r);
+ if (enable) return true;
+ }
return mustBeDrawn();
}