summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-06-18 18:35:53 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-06-18 18:35:53 +0200
commitb251f5165ea3530747657b522773c4a8f44b16fa (patch)
tree68d830acec3fe8c171429ac903a16944ed31120c /src/battlemap/game-logic
parenta174bc2cc95b94c0b7d786e764c48de72206d7c5 (diff)
Separates tiles from their icon images IDs.
The client has yet to be updated to support the new exchanges.
Diffstat (limited to 'src/battlemap/game-logic')
-rw-r--r--src/battlemap/game-logic/bm_movement.erl4
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