diff options
author | Haru <haru@dotalux.com> | 2019-11-17 17:06:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-17 17:06:41 +0100 |
commit | 560dd6ac2d7a45fd00de5d97d7fa06d669f83cdf (patch) | |
tree | 95f2a48577a6d9467f77ec3b70167249de54df08 /src | |
parent | 1f000882ca8ce9d4bb48757b81848b8b6a98ad0e (diff) | |
parent | 78696300e2c09d948407b98d9eac014c882046fe (diff) | |
download | hercules-560dd6ac2d7a45fd00de5d97d7fa06d669f83cdf.tar.gz hercules-560dd6ac2d7a45fd00de5d97d7fa06d669f83cdf.tar.bz2 hercules-560dd6ac2d7a45fd00de5d97d7fa06d669f83cdf.tar.xz hercules-560dd6ac2d7a45fd00de5d97d7fa06d669f83cdf.zip |
Merge pull request #2564 from skyleo/target_to_fixes
Fix ud->target_to not being cleared appropriately
Diffstat (limited to 'src')
-rw-r--r-- | src/map/unit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 1e9433eaf..05cb112e3 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -459,10 +459,10 @@ static int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) } if (tbl->m == bl->m && check_distance_bl(bl, tbl, ud->chaserange)) { //Reached destination. + ud->target_to = 0; if (ud->state.attack_continue) { //Aegis uses one before every attack, we should //only need this one for syncing purposes. [Skotlex] - ud->target_to = 0; clif->fixpos(bl); unit->attack(bl, tbl->id, ud->state.attack_continue); } @@ -544,6 +544,8 @@ static int unit_walktoxy(struct block_list *bl, short x, short y, int flag) ud->to_x = x; ud->to_y = y; unit->stop_attack(bl); //Sets target to 0 + if ((flag & 8) == 0) // Stepaction might be delayed due to occupied cell + unit->stop_stepaction(bl); // unit->walktoxy removes any remembered stepaction and resets ud->target_to sc = status->get_sc(bl); if( sc ) { |