Jelajahi Sumber

fixing Epirata's warnings and errors [Shinomori]

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1095 54d463be-8e91-2dee-dedb-b68131a5f0ec
(no author) 20 tahun lalu
induk
melakukan
01b5716834
2 mengubah file dengan 5 tambahan dan 5 penghapusan
  1. 4 4
      src/map/map.c
  2. 1 1
      src/map/map.h

+ 4 - 4
src/map/map.c

@@ -1043,8 +1043,8 @@ if you want to keep this that way then check and swap x0,y0 with x1,y1
 						// check if block xy is on the line
 						if( (bl->x-x0)*(y1-y0) == (bl->y-y0)*(x1-x0) )
 						// and if it is within start and end point
-						if( ((x0<=x1)&&(x0<=bl->x)&&(bl->x<=x1) || (x0>=x1)&&(x0>=bl->x)&&(bl->x>=x1)) &&
-							((y0<=y1)&&(y0<=bl->y)&&(bl->y<=y1) || (y0>=y1)&&(y0>=bl->y)&&(bl->y>=y1)) )
+						if( (((x0<=x1)&&(x0<=bl->x)&&(bl->x<=x1)) || ((x0>=x1)&&(x0>=bl->x)&&(bl->x>=x1))) &&
+							(((y0<=y1)&&(y0<=bl->y)&&(bl->y<=y1)) || ((y0>=y1)&&(y0>=bl->y)&&(bl->y>=y1))) )
 							bl_list[bl_list_count++]=bl;
 					}
 				}//end for elements
@@ -1057,8 +1057,8 @@ if you want to keep this that way then check and swap x0,y0 with x1,y1
 						// check if mob xy is on the line
 						if( (bl->x-x0)*(y1-y0) == (bl->y-y0)*(x1-x0) )
 						// and if it is within start and end point
-						if( ((x0<=x1)&&(x0<=bl->x)&&(bl->x<=x1) || (x0>=x1)&&(x0>=bl->x)&&(bl->x>=x1)) &&
-							((y0<=y1)&&(y0<=bl->y)&&(bl->y<=y1) || (y0>=y1)&&(y0>=bl->y)&&(bl->y>=y1)) )
+						if( (((x0<=x1)&&(x0<=bl->x)&&(bl->x<=x1)) || ((x0>=x1)&&(x0>=bl->x)&&(bl->x>=x1))) &&
+							(((y0<=y1)&&(y0<=bl->y)&&(bl->y<=y1)) || ((y0>=y1)&&(y0>=bl->y)&&(bl->y>=y1))) )
 							bl_list[bl_list_count++]=bl;
 					}
 				}//end for mobs

+ 1 - 1
src/map/map.h

@@ -689,7 +689,7 @@ void map_foreachinarea(int (*)(struct block_list*,va_list),int,int,int,int,int,i
 // -- moonsoul (added map_foreachincell)
 void map_foreachincell(int (*)(struct block_list*,va_list),int,int,int,int,...);
 void map_foreachinmovearea(int (*)(struct block_list*,va_list),int,int,int,int,int,int,int,int,...);
-void map_foreachinpath(int (*)(struct block_list*,va_list),int,int,int,int,int,int,...); // Celest
+void map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y0,int x1,int y1,int range,int length,int type,...); // Celest
 int map_countnearpc(int,int,int);
 //blockŠÖ˜A‚ɒljÁ
 int map_count_oncell(int m,int x,int y);