From 28568dcb403cb7d1369b4bb2a4242a108794dbf9 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 20 Apr 2006 00:08:46 +0000 Subject: - Added back the "you can't walk delay while attacking" to unit_attack_timer, now when you want to walk during your attack animation, you will only stop attacking, you will have to click again to move. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6185 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 4 ++++ src/map/clif.c | 7 +++---- src/map/unit.c | 4 +--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index efb7e148f..6862fd65d 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/04/19 + * Added back the "you can't walk delay while attacking" to + unit_attack_timer, now when you want to walk during your attack animation, + you will only stop attacking, you will have to click again to move. + [Skotlex] * Fixed a pair of wrong mapflag lines in nopvp.txt [Skotlex] * Removed the max cap of autoloot so you are now allowed to set autoloot values above 100. [Skotlex] diff --git a/src/map/clif.c b/src/map/clif.c index 432329745..484abb02a 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8158,17 +8158,16 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd) { if (clif_cant_act(sd) && sd->sc.opt1 != OPT1_STONEWAIT) return; - if (!unit_can_move(&sd->bl)) + if(sd->sc.count && sd->sc.data[SC_RUN].timer != -1) return; - if(sd->sc.count && sd->sc.data[SC_RUN].timer != -1) + pc_stop_attack(sd); + if (!unit_can_move(&sd->bl)) return; if (sd->invincible_timer != -1) pc_delinvincibletimer(sd); - pc_stop_attack(sd); - cmd = RFIFOW(fd,0); x = RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0]) * 4 + (RFIFOB(fd,packet_db[sd->packet_ver][cmd].pos[0] + 1) >> 6); diff --git a/src/map/unit.c b/src/map/unit.c index 08b29cc5b..8b60d4ef5 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1302,9 +1302,7 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t ud->attackabletime = tick + status_get_adelay(src); // You can't move if you can't attack neither. -// Only for non-players, since it makes it near impossible to run away when you are on auto-attack. - if (src->type != BL_PC) - unit_set_walkdelay(src, tick, status_get_amotion(src), 1); + unit_set_walkdelay(src, tick, status_get_amotion(src), 1); } if(ud->state.attack_continue) -- cgit v1.2.3-70-g09d2