summary refs log tree commit diff stats
path: root/src/com/fourisland
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-03-09 17:02:53 -0400
committerStarla Insigna <hatkirby@fourisland.com>2009-03-09 17:02:53 -0400
commitaa575d82717f50c3724be72ca7ab4bcb8de725ee (patch)
tree9a143b28c939d1713ad2dcc685e421f8548b578e /src/com/fourisland
parent5c0f253d5d59a042f57c4cb209092729ece8a310 (diff)
downloadfourpuzzle-aa575d82717f50c3724be72ca7ab4bcb8de725ee.tar.gz
fourpuzzle-aa575d82717f50c3724be72ca7ab4bcb8de725ee.tar.bz2
fourpuzzle-aa575d82717f50c3724be72ca7ab4bcb8de725ee.zip
Engine: Fixed walk-thru bug
Two specific events on the test map were always running over eachother. This problem started a few commits ago, but it was uncertain which commit this was. The key to solving the problem, as all other debugging didn't show anything, was that a certain event appeared to be blocked by something when it walked downward, which wasn't there. It was then discerned that that location was the original location of a moving event.

From there it was discerned that the parent map used by AbstractEvent was the original map that was copied from, not the map being used by MapViewGameState. A simple change to Map's copy() function fixed this.
Diffstat (limited to 'src/com/fourisland')
-rwxr-xr-xsrc/com/fourisland/fourpuzzle/gamestate/mapview/Map.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java index 8b262dd..9e5298b 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java
@@ -74,7 +74,7 @@ public class Map {
74 } 74 }
75 75
76 temp.mapData = new Vector<HashMap<Integer,Integer>>(getMapData()); 76 temp.mapData = new Vector<HashMap<Integer,Integer>>(getMapData());
77 temp.events = getEvents().copy(this); 77 temp.events = getEvents().copy(temp);
78 78
79 return temp; 79 return temp;
80 } 80 }