From c5394ee2a6de499e6792a153618895a7ba348c25 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 28 Apr 2009 16:48:46 +0000 Subject: - 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 --- src/map/unit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map') 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; -- cgit v1.2.3-70-g09d2