summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskyleo <skyleo@skyleo.de>2019-10-03 19:15:04 +0200
committerHaru <haru@dotalux.com>2020-03-08 20:56:27 +0100
commit4e0b33282d2f8914fa5e425f65d6e15f8bd86526 (patch)
treeb4e4870226e07dd28a3a91e7e23251a96450e7d3 /src/map/unit.c
parent2351fb29487eb11df3c9d563f5ade84ece4e8d0b (diff)
downloadhercules-4e0b33282d2f8914fa5e425f65d6e15f8bd86526.tar.gz
hercules-4e0b33282d2f8914fa5e425f65d6e15f8bd86526.tar.bz2
hercules-4e0b33282d2f8914fa5e425f65d6e15f8bd86526.tar.xz
hercules-4e0b33282d2f8914fa5e425f65d6e15f8bd86526.zip
Change returning error-code in unit->walktoxy_sub
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index d1abed1d0..d8d4f1144 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -131,13 +131,13 @@ static int unit_walktoxy_sub(struct block_list *bl)
struct walkpath_data wpd = {0};
if (!path->search(&wpd, bl, bl->m, bl->x, bl->y, ud->to_x, ud->to_y, ud->state.walk_easy, CELL_CHKNOPASS))
- return 0;
+ return 1;
#ifdef OFFICIAL_WALKPATH
if (bl->type != BL_NPC // If type is an NPC, disregard.
&& !path->search_long(NULL, bl, bl->m, bl->x, bl->y, ud->to_x, ud->to_y, CELL_CHKNOPASS) // Check if there is an obstacle between
&& wpd.path_len > 14) { // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett]
- return 0;
+ return 1;
}
#endif
@@ -181,7 +181,7 @@ static int unit_walktoxy_sub(struct block_list *bl)
if (timer_delay > 0)
ud->walktimer = timer->add(timer->gettick() + timer_delay, unit->walktoxy_timer, bl->id, 0); //TODO: check if unit->walktoxy_timer uses any intptr data
- return 1;
+ return 0;
}
/**