diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-05 12:39:28 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-05 12:39:28 +0000 |
commit | 17724e67996877069caf4533b835c41c696d5cdc (patch) | |
tree | 0f300e115230c611d63ab1672f243735662ad7e0 /src/map/unit.c | |
parent | 26514497d6b4114bdb819966411ebe43bb3a2075 (diff) | |
download | hercules-17724e67996877069caf4533b835c41c696d5cdc.tar.gz hercules-17724e67996877069caf4533b835c41c696d5cdc.tar.bz2 hercules-17724e67996877069caf4533b835c41c696d5cdc.tar.xz hercules-17724e67996877069caf4533b835c41c696d5cdc.zip |
- Now when walkdelay is set to 0, characters will stop walking when hit, but will not have any walk delay.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6486 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index d7613cc02..bbb73ecdd 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -674,9 +674,14 @@ int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int ud->canmove_tick = tick + delay;
if (ud->walktimer != -1)
{ //Stop walking, if chasing, readjust timers.
- unit_stop_walking(bl,3);
- if(ud->target)
- add_timer(ud->canmove_tick+1, unit_walktobl_sub, bl->id, ud->target);
+ if (delay == 1)
+ { //Minimal delay (walk-delay) disabled. Just stop walking.
+ unit_stop_walking(bl,1);
+ } else {
+ unit_stop_walking(bl,3);
+ if(ud->target)
+ add_timer(ud->canmove_tick+1, unit_walktobl_sub, bl->id, ud->target);
+ }
}
return 1;
}
|