diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-14 21:25:58 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-14 21:25:58 +0000 |
commit | d93a829a1384d73247201101b20cf97a49a71b75 (patch) | |
tree | e6f6297ae23f8c5a05c5d09c3525680dfc0b0f82 /src/map | |
parent | ea18ac665ccb101300a532f56702d351da133bac (diff) | |
download | hercules-d93a829a1384d73247201101b20cf97a49a71b75.tar.gz hercules-d93a829a1384d73247201101b20cf97a49a71b75.tar.bz2 hercules-d93a829a1384d73247201101b20cf97a49a71b75.tar.xz hercules-d93a829a1384d73247201101b20cf97a49a71b75.zip |
unit_blown now returns number of moved cells, bugreport:4985
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15116 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/unit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 0225b4b87..0b6e098a9 100644 --- a/src/map/unit.c +++ b/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); |