From 4e0b33282d2f8914fa5e425f65d6e15f8bd86526 Mon Sep 17 00:00:00 2001 From: skyleo Date: Thu, 3 Oct 2019 19:15:04 +0200 Subject: Change returning error-code in unit->walktoxy_sub --- src/map/unit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/unit.c') 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; } /** -- cgit v1.2.3-60-g2f50