浏览代码

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

Capuche 10 年之前
父节点
当前提交
308c4779c8
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      doc/script_commands.txt
  2. 1 1
      src/map/mob.c

+ 1 - 1
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:
 

+ 1 - 1
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)