summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaruna <haru@dotalux.com>2015-01-20 13:27:32 +0100
committerHaruna <haru@dotalux.com>2015-01-20 13:27:32 +0100
commit40f73981d9bacfc9e7b032790a5c35e32f68ac2a (patch)
treefe39ba540986f856fa9807d9ff61dbd0c24139b5 /src/map
parent4ae2b9b72dd4fce3d7a7778222d1c39abbb564a4 (diff)
parentd8400bcc065367779f67740bc59aac976bd5eda1 (diff)
downloadhercules-40f73981d9bacfc9e7b032790a5c35e32f68ac2a.tar.gz
hercules-40f73981d9bacfc9e7b032790a5c35e32f68ac2a.tar.bz2
hercules-40f73981d9bacfc9e7b032790a5c35e32f68ac2a.tar.xz
hercules-40f73981d9bacfc9e7b032790a5c35e32f68ac2a.zip
Merge pull request #448 from HerculesWS/window_fix
Fixes Compile Error on Windows
Diffstat (limited to 'src/map')
-rw-r--r--src/map/unit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index a1c739af3..27b96c55b 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -116,8 +116,9 @@ int unit_walktoxy_sub(struct block_list *bl)
//Trim the last part of the path to account for range,
//but always move at least one cell when requested to move.
for (i = (ud->chaserange*10)-10; i > 0 && ud->walkpath.path_len>1;) {
+ uint8 dir;
ud->walkpath.path_len--;
- uint8 dir = ud->walkpath.path[ud->walkpath.path_len];
+ dir = ud->walkpath.path[ud->walkpath.path_len];
if (dir&1)
i -= MOVE_COST*20; //When chasing, units will target a diamond-shaped area in range [Playtester]
else