From dbbe1b3a5621aa982ec6f068807558f1722f1f6b Mon Sep 17 00:00:00 2001 From: rud0lp20 Date: Thu, 2 Aug 2012 15:56:05 +0000 Subject: 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 --- src/map/unit.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/map/unit.c') 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; -- cgit v1.2.3-60-g2f50