diff options
author | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-08-02 15:56:05 +0000 |
---|---|---|
committer | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-08-02 15:56:05 +0000 |
commit | dbbe1b3a5621aa982ec6f068807558f1722f1f6b (patch) | |
tree | 6a2f5868891bb4c849e974b20ef584b7011d2e57 | |
parent | 1743f5ff2c948f8305d9226381a971755880c6d1 (diff) | |
download | hercules-dbbe1b3a5621aa982ec6f068807558f1722f1f6b.tar.gz hercules-dbbe1b3a5621aa982ec6f068807558f1722f1f6b.tar.bz2 hercules-dbbe1b3a5621aa982ec6f068807558f1722f1f6b.tar.xz hercules-dbbe1b3a5621aa982ec6f068807558f1722f1f6b.zip |
Fixed bugreport:6099 where warp portal ignores knock back and snap's unit positioning.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16562 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/map/unit.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index f160cb0ce..e2735fdc8 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -613,7 +613,10 @@ int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool if( checkpath && (map_getcell(bl->m,dst_x,dst_y,CELL_CHKNOPASS) || !path_search(NULL,bl->m,bl->x,bl->y,dst_x,dst_y,easy,CELL_CHKNOREACH)) ) return 0; // unreachable - dir = map_calc_dir(bl, dst_x,dst_y); + ud->to_x = dst_x; + ud->to_y = dst_y; + + dir = map_calc_dir(bl, dst_x, dst_y); ud->dir = dir; dx = dst_x - bl->x; @@ -702,6 +705,9 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag) unit_stop_walking(bl, 0); } + sd->ud.to_x = nx; + sd->ud.to_y = ny; + dx = nx-bl->x; dy = ny-bl->y; |