Skip to content

Commit

Permalink
Merge pull request #24 from csnv/fix/walkdelay-unmovable
Browse files Browse the repository at this point in the history
Always use type 0 for damage-induced walk delay
  • Loading branch information
csnv authored Feb 17, 2025
2 parents db6e9c4 + 513b605 commit 75bbcb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ static int battle_delay_damage(int64 tick, int amotion, struct block_list *src,
walkdelay_latency = skill_id == 0 ? mob_delay : 0; // Skills have 0 delay?

if (damage > 0)
timer->add(timer->gettick() + walkdelay_latency, unit->set_walkdelay_timer, target->id, MakeDWord(ddelay, skill_id != 0));
timer->add(timer->gettick() + walkdelay_latency, unit->set_walkdelay_timer, target->id, ddelay);
#endif

timer->add(tick + amotion, battle->delay_damage_sub, 0, (intptr_t)dat);
Expand Down
5 changes: 1 addition & 4 deletions src/map/unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1360,10 +1360,7 @@ static int unit_set_walkdelay_timer(int tid, int64 tick, int id, intptr_t data)
if (target == NULL)
return 0;

int delay = (int)GetWord((uint32)data, 0);
int type = (int)GetWord((uint32)data, 1);

unit->set_walkdelay(target, tick, delay, type);
unit->set_walkdelay(target, tick, (int32)data, 0);

return 0;
}
Expand Down

0 comments on commit 75bbcb4

Please sign in to comment.