Преглед изворни кода

Follow-up to https://github.com/rathena/rathena/commit/0fd7ba72dfea51b037f02ebc77c00d5f7e585a6a
- Fixed a compiler warning that showed when deactivating ACTIVEPATHSEARCH (special thanks to Napster for pointing it out)

Playtester пре 10 година
родитељ
комит
0359420f42
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/map/mob.c

+ 1 - 1
src/map/mob.c

@@ -1068,7 +1068,6 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
 {
 	struct mob_data *md;
 	struct block_list **target;
-	struct walkpath_data wpd;
 	int mode;
 	int dist;
 
@@ -1104,6 +1103,7 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap)
 			battle_check_range(&md->bl,bl,md->db->range2)
 		) { //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
 				return 0;
 			//Standing monsters use range2, walking monsters use range3