summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-04-28 16:48:46 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-04-28 16:48:46 +0000
commitc5394ee2a6de499e6792a153618895a7ba348c25 (patch)
tree97c5fedd038f0e81736058238ef8ade7dbb6180b /src
parent3ec27a09162800bdb6e2b0e80a393160b893a096 (diff)
downloadhercules-c5394ee2a6de499e6792a153618895a7ba348c25.tar.gz
hercules-c5394ee2a6de499e6792a153618895a7ba348c25.tar.bz2
hercules-c5394ee2a6de499e6792a153618895a7ba348c25.tar.xz
hercules-c5394ee2a6de499e6792a153618895a7ba348c25.zip
- Avoid setting the canwalk delay after being hit if the target is already unable to move.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13706 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/unit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 44ca13731..577dc8ae7 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -757,7 +757,6 @@ int unit_can_move(struct block_list *bl)
return 1;
}
-
/*==========================================
* Resume running after a walk delay
*------------------------------------------*/
@@ -792,7 +791,8 @@ int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int
if (DIFF_TICK(ud->canmove_tick, tick+delay) > 0)
return 0;
} else {
- if (DIFF_TICK(ud->canmove_tick, tick) > 0)
+ //Don't set walk delays when already trapped.
+ if (!unit_can_move(bl))
return 0;
}
ud->canmove_tick = tick + delay;