From b251f5165ea3530747657b522773c4a8f44b16fa Mon Sep 17 00:00:00 2001 From: nsensfel Date: Mon, 18 Jun 2018 18:35:53 +0200 Subject: Separates tiles from their icon images IDs. The client has yet to be updated to support the new exchanges. --- src/battlemap/game-logic/bm_movement.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/battlemap/game-logic') 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 -- cgit v1.2.3-70-g09d2