diff --git a/src/main/java/fr/ynerant/leveleditor/game/BasicTower.java b/src/main/java/fr/ynerant/leveleditor/game/BasicTower.java index 0f377f9..486d6d6 100644 --- a/src/main/java/fr/ynerant/leveleditor/game/BasicTower.java +++ b/src/main/java/fr/ynerant/leveleditor/game/BasicTower.java @@ -34,7 +34,8 @@ public class BasicTower extends Tower { List filtered = new ArrayList<>(); for (Mob mob : mobs) { - if (mob.getX() == getX() || mob.getY() == getY()) + if ((mob.getX() == getX() || mob.getY() == getY()) + && Math.abs(mob.getX() - getX()) <= 3 && Math.abs(mob.getY() - getY()) <= 3) filtered.add(mob); }