diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2013-02-03 23:21:36 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2013-02-03 23:21:36 +0800 |
commit | 7626b141f8e56b1739abce76f5a99cbbb2b4b159 (patch) | |
tree | 6e161a3c3b64107061103d48a84310b824be4ffa /src/map | |
parent | 63145d6d4079b692a3cd36eb340b9a0e71b9fbaa (diff) | |
download | hercules-7626b141f8e56b1739abce76f5a99cbbb2b4b159.tar.gz hercules-7626b141f8e56b1739abce76f5a99cbbb2b4b159.tar.bz2 hercules-7626b141f8e56b1739abce76f5a99cbbb2b4b159.tar.xz hercules-7626b141f8e56b1739abce76f5a99cbbb2b4b159.zip |
Fixed Bug #7042
Fixed wrong 'if' condition in checking CELL_CHKNOPASS for the
OFFICIAL_WALKPATH where clear path is considered to be limited to 14
cells it should only be with obstacles.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/unit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index b7da5629f..afb7cf19f 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -325,7 +325,8 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag) if( ud == NULL) return 0; #ifdef OFFICIAL_WALKPATH - if( path_search(&wpd, bl->m, bl->x, bl->y, x, y, flag&1, CELL_CHKNOPASS) // Check if there is an obstacle between + path_search(&wpd, bl->m, bl->x, bl->y, x, y, flag&1, CELL_CHKNOPASS); // Count walk path cells + if( !path_search_long(NULL, bl->m, bl->x, bl->y, x, 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; #endif |