| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src/battlemap/game-logic')
| -rw-r--r-- | src/battlemap/game-logic/bm_movement.erl | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/src/battlemap/game-logic/bm_movement.erl b/src/battlemap/game-logic/bm_movement.erl index ed4c38c..8bf2c5b 100644 --- a/src/battlemap/game-logic/bm_movement.erl +++ b/src/battlemap/game-logic/bm_movement.erl @@ -30,7 +30,9 @@ cross (_Battlemap, _ForbiddenLocations, [], Cost, Location) ->     {Location, Cost};  cross (Battlemap, ForbiddenLocations, [Step|NextSteps], Cost, Location) ->     NextLocation = bm_location:apply_direction(Step, Location), -   NextTile = bm_battlemap:get_tile_id(NextLocation, Battlemap), +   NextTileClassID = bm_battlemap:get_tile_class_id(NextLocation, Battlemap), +   NextTileID = bm_tile:class_id_to_type_id(NextTileClassID), +   NextTile = bm_tile:from_id(NextTileID),     NextCost = (Cost + bm_tile:get_cost(NextTile)),     IsForbidden =        lists:foldl | 


