Updated ACTIVEPATHSEARCH
- Changed "ACTIVEPATHSEARCH" to only work with real walls and not walls you can shoot through * Seems the position lag for which I have implemented this no longer occurs on my client (was something changed?) * Previous implementation prevented monsters from attacking you through shootable walls * Special thanks to Michi for notifying me about this issue Credit @Playtester
This commit is contained in:
parent
df2f850c74
commit
308c4779c8
@ -2304,7 +2304,7 @@ Also useful when passing arrays to functions or accessing another npc's arrays:
|
|||||||
|
|
||||||
This function will return the specified stat of the invoking character, or, if a
|
This function will return the specified stat of the invoking character, or, if a
|
||||||
character name is specified, of that player. The stat can either be a number or
|
character name is specified, of that player. The stat can either be a number or
|
||||||
paramter name, defined in 'db/const.txt'.
|
paramater name, defined in 'db/const.txt'.
|
||||||
|
|
||||||
Some example parameters:
|
Some example parameters:
|
||||||
|
|
||||||
|
@ -1099,7 +1099,7 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
|
|||||||
) { //Pick closest target?
|
) { //Pick closest target?
|
||||||
#ifdef ACTIVEPATHSEARCH
|
#ifdef ACTIVEPATHSEARCH
|
||||||
struct walkpath_data wpd;
|
struct walkpath_data wpd;
|
||||||
if (!path_search(&wpd, md->bl.m, md->bl.x, md->bl.y, bl->x, bl->y, 0, CELL_CHKNOPASS)) // Count walk path cells
|
if (!path_search(&wpd, md->bl.m, md->bl.x, md->bl.y, bl->x, bl->y, 0, CELL_CHKWALL)) // Count walk path cells
|
||||||
return 0;
|
return 0;
|
||||||
//Standing monsters use range2, walking monsters use range3
|
//Standing monsters use range2, walking monsters use range3
|
||||||
if ((md->ud.walktimer == INVALID_TIMER && wpd.path_len > md->db->range2)
|
if ((md->ud.walktimer == INVALID_TIMER && wpd.path_len > md->db->range2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user