summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-10 19:12:45 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-10 19:23:17 +0300
commitdc45b9c29cfcf7c64f95dc9f81b1612dda68341d (patch)
tree194eb0b7f881d436cca129ece3c69bd75e68fc24 /src/map/map.c
parentc76aa5f4843a521b1839875bf6c139f4658bd6d1 (diff)
downloadhercules-dc45b9c29cfcf7c64f95dc9f81b1612dda68341d.tar.gz
hercules-dc45b9c29cfcf7c64f95dc9f81b1612dda68341d.tar.bz2
hercules-dc45b9c29cfcf7c64f95dc9f81b1612dda68341d.tar.xz
hercules-dc45b9c29cfcf7c64f95dc9f81b1612dda68341d.zip
Add to path search functions source bl for plugins usage.
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 6e35e6bb6..ab34799ee 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -840,7 +840,7 @@ static int bl_vgetall_inshootrange(struct block_list *bl, va_list args)
if (!check_distance_bl(center, bl, range))
return 0;
#endif
- if (!path->search_long(NULL, center->m, center->x, center->y, bl->x, bl->y, CELL_CHKWALL))
+ if (!path->search_long(NULL, center, center->m, center->x, center->y, bl->x, bl->y, CELL_CHKWALL))
return 0;
return 1;
}
@@ -1195,7 +1195,7 @@ static int bl_vgetall_inpath(struct block_list *bl, va_list args)
if ( k < 0 || k > len_limit ) //Since more skills use this, check for ending point as well.
return 0;
- if ( k > magnitude2 && !path->search_long(NULL, m, x0, y0, xi, yi, CELL_CHKWALL) )
+ if ( k > magnitude2 && !path->search_long(NULL, NULL, m, x0, y0, xi, yi, CELL_CHKWALL) )
return 0; //Targets beyond the initial ending point need the wall check.
//All these shifts are to increase the precision of the intersection point and distance considering how it's
@@ -2567,7 +2567,7 @@ int map_random_dir(struct block_list *bl, int16 *x, int16 *y)
xi = bl->x + segment*dirx[j];
segment = (short)sqrt((float)(dist2 - segment*segment)); //The complement of the previously picked segment
yi = bl->y + segment*diry[j];
- } while ( (map->getcell(bl->m,xi,yi,CELL_CHKNOPASS) || !path->search(NULL,bl->m,bl->x,bl->y,xi,yi,1,CELL_CHKNOREACH))
+ } while ( (map->getcell(bl->m,xi,yi,CELL_CHKNOPASS) || !path->search(NULL,bl,bl->m,bl->x,bl->y,xi,yi,1,CELL_CHKNOREACH))
&& (++i)<100 );
if (i < 100) {