Explorar o código

unit_blown now returns number of moved cells, bugreport:4985

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15116 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind %!s(int64=13) %!d(string=hai) anos
pai
achega
4a9eecf97a
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      src/map/unit.c

+ 5 - 1
src/map/unit.c

@@ -686,7 +686,11 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag)
 		if(dx || dy)
 		{
 			map_foreachinmovearea(clif_outsight, bl, AREA_SIZE, dx, dy, bl->type == BL_PC ? BL_ALL : BL_PC, bl);
-
+			
+			count = distance_xy(bl->x,bl->y,dx,dy);
+			if( count < 0 )
+				count = -count;
+			
 			if(su)
 			{
 				skill_unit_move_unit_group(su->group, bl->m, dx, dy);