summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-06-13 13:32:43 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-06-13 13:32:43 +0200
commit499c0981df958643097f96365138df689432e5b4 (patch)
tree4ad005b50aa261612e6a46f4549c1046134d3644 /src/shared/battle-map/BattleMap/Struct/Location.elm
parent9eaf4c0a006e2a08fdd1e2248978c4ac5cdaef3b (diff)
Adds AoO pathfinding & temporary representation.
The animation manager does not work correctly though: when a move action has been interrupted, it will rewind like if there was only the last movement part, yet play back all parts, landing the character at the wrong location.
Diffstat (limited to 'src/shared/battle-map/BattleMap/Struct/Location.elm')
-rw-r--r--src/shared/battle-map/BattleMap/Struct/Location.elm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/battle-map/BattleMap/Struct/Location.elm b/src/shared/battle-map/BattleMap/Struct/Location.elm
index 6b07e90..d3243c2 100644
--- a/src/shared/battle-map/BattleMap/Struct/Location.elm
+++ b/src/shared/battle-map/BattleMap/Struct/Location.elm
@@ -112,7 +112,7 @@ add_neighborhood_to_set map_width map_height tdist loc set =
(List.foldl
(\height_mod current_width_result ->
let
- abs_width_mod = (abs (tdist - height_mod))
+ abs_width_mod = (abs (tdist - (abs height_mod)))
current_height = (loc.y + height_mod)
in
if ((current_height < 0) || (current_height >= map_height))