From 308c4779c8eb37c4b486c593220e3837f5ec26e4 Mon Sep 17 00:00:00 2001 From: Capuche Date: Wed, 15 Apr 2015 13:02:20 +0200 Subject: [PATCH] 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 --- doc/script_commands.txt | 2 +- src/map/mob.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 920f5c1ca3..7b9ed7f54c 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -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 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: diff --git a/src/map/mob.c b/src/map/mob.c index 2604654535..99e0ada34b 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1099,7 +1099,7 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap) ) { //Pick closest target? #ifdef ACTIVEPATHSEARCH 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; //Standing monsters use range2, walking monsters use range3 if ((md->ud.walktimer == INVALID_TIMER && wpd.path_len > md->db->range2)