Browse Source

- Small adjustment on the mob_ai code which could fix mobs not chasing you if you hit them from the maximum possible diagonal distance.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8490 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 years ago
parent
commit
3a1128726c
3 changed files with 5 additions and 2 deletions
  1. 3 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/map.h
  3. 1 1
      src/map/mob.c

+ 3 - 0
Changelog-Trunk.txt

@@ -3,6 +3,9 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2006/08/26
+	* Small adjustment on the mob_ai code which could fix mobs not chasing you
+	  if you hit them from the maximum possible diagonal distance. [Skotlex]
 2006/08/25
 	* Cleaned some the skill unit removal added flag so that it signals whether
 	  the skill is being force-removed, or it has "naturally expired". [Skotlex]

+ 1 - 1
src/map/map.h

@@ -48,7 +48,7 @@
 #define MAX_VENDING 12
 #define MOBID_EMPERIUM 1288
 
-#define MAX_PC_BONUS 10
+#define MAX_PC_BONUS 15
 //Designed for search functions, species max number of matches to display.
 #define MAX_SEARCH 5
 #define MAX_DUEL 1024

+ 1 - 1
src/map/mob.c

@@ -1116,7 +1116,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
 				(dist = distance_bl(&md->bl, abl)) >= MAX_MINCHASE ||
 				battle_check_target(bl, abl, BCT_ENEMY) <= 0 ||
 				(battle_config.mob_ai&2 && !status_check_skilluse(bl, abl, 0, 0)) ||
-				!mob_can_reach(md, abl, dist+2, MSS_RUSH) ||
+				!mob_can_reach(md, abl, dist+md->db->range3, MSS_RUSH) ||
 				(	//Gangster Paradise check
 					abl->type == BL_PC && !(mode&MD_BOSS) &&
 					((TBL_PC*)abl)->state.gangsterparadise