about summary refs log tree commit diff stats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/fourisland/frigidearth/MapViewGameState.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/com/fourisland/frigidearth/MapViewGameState.java b/src/com/fourisland/frigidearth/MapViewGameState.java index 732f340..3b8489d 100644 --- a/src/com/fourisland/frigidearth/MapViewGameState.java +++ b/src/com/fourisland/frigidearth/MapViewGameState.java
@@ -868,7 +868,21 @@ public class MapViewGameState implements GameState
868 868
869 if (path != null) 869 if (path != null)
870 { 870 {
871 mob.moveInDirection(path.get(0)); 871 Point to = path.get(0).to(mob.getPosition());
872 boolean found = false;
873 for (Mob m : mobs)
874 {
875 if (m.getPosition().equals(to))
876 {
877 found = true;
878 break;
879 }
880 }
881
882 if (!found)
883 {
884 mob.moveInDirection(path.get(0));
885 }
872 } 886 }
873 } 887 }
874 } else { 888 } else {