summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-12-28 15:20:44 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-12-28 15:20:44 +0100
commit02bd9c7afcde4a6518a5b9efdc4033318a305e3d (patch)
treefdaa3d301ce8b5c20be1c455c4849f425da097a7 /core
parentfe37e65deffa67e9f0dd738726ed553301634f20 (diff)
downloadRustAndDust-02bd9c7afcde4a6518a5b9efdc4033318a305e3d.zip
RustAndDust-02bd9c7afcde4a6518a5b9efdc4033318a305e3d.tar.gz
Tile: enableOverlay() does nothing if index < 0
Diffstat (limited to 'core')
-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();
}