Issue information

Issue ID
#3102
Status
Fixed
Severity
None
Started
Hercules Elf Bot
May 21, 2009 2:01
Last Post
Hercules Elf Bot
Apr 18, 2012 9:36
Confirmation
N/A

Hercules Elf Bot - May 21, 2009 2:01

Originally posted by [b]Henko[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=3102

This bug is seriously disturbing since ages. When you use a skill that knocks back the enemy when hit like Wizard's Jupitel Thunder, the monster is knocked back, but it doesn't wait on the server for the animation to end, instead it begins to walk towards you. But this can't be seen on the client as it still plays the skill damage animation. So when it ends the monster seems to just jump at you in an instant, because it walked near to you till then. If you're unlucky it also kills you in that very moment as you have no def as a wizard. :D

So I think everyone knows about the problem and it really should be fixed. I don't understand why no one cares about this.

I spent a whole night analyzing this issue, and I think I worked out a possible solution.

Maybe you could check this out, and give feedback.

Firstly I played with the void clif_blown(struct block_list *bl) function, and checked what happens if I modify things.
I have ended out like this:

[code]void clif_blown(struct block_list *bl)
{
//It seems both needed. by Henko
clif_fixpos(bl);
clif_slide(bl, bl->x, bl->y);
clif_fixpos(bl);
}[/code]

I have modified the delay times in the battle conf too:
[code]// Move-delay adjustment after being hit. (Note 2)
// The 'can't walk' delay after being hit is calculated as a percentage of the damage animation duration.
// NOTE: Only affects the normal delay from a single attack, not the delay added by the multihit_delay option below.
pc_damage_walk_delay_rate: 20
damage_walk_delay_rate: 200

// Move-delay adjustment for multi-hitting attacks.
// When hit by a multi-hitting skill like Lord of Vermillion or Jupitel Thunder, characters will be
// unable to move for an additional "(number of hits -1) * multihit_delay" milliseconds.
// 80 is the setting that feels like Aegis (vs Sonic Blows)
// 230 is the setting that makes walkdelay last until the last hit (vs Jupitel thunder)
multihit_delay: 200[/code]

It worked on older revisions. But when I tried it with the newest 13798 Trunk, It didn't work again.
I checked the revision log, and found the commit that caused it:

[code]Revision: 13706
Author: skotlex
Date: 18:48:46, 2009. �prilis 28.
Message:
- Avoid setting the canwalk delay after being hit if the target is already unable to move.

----
Modified : /trunk/src/map/unit.c[/code]

I wrote the changed line back to the original version, and it worked well again.

[code]int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int type)
{
struct unit_data *ud = unit_bl2ud(bl);
if (delay <= 0 || !ud) return 0;

if (type) {
if (DIFF_TICK(ud->canmove_tick, tick+delay) > 0)
return 0;
} else {
if (DIFF_TICK(ud->canmove_tick, tick) > 0) // <---- This is the original line.
//Don't set walk delays when already trapped.
//if (!unit_can_move(bl)) <---- This causes Position lag, because the mobs start walking when they are currently under skill damage too.
return 0;
}[/code]

Of course I'm not sure if this was the best solution.
I rather think it is somewhere deeper, but I'm not in the core dev team to have a look through the complicated unit movement behavior.

Maybe not every modifications I made are necessary, but currently this works for me, so now wizards have a better chance on my server too. :)

Henko

This post has been edited by Brian on Mar 23, 2012 16:44

Hercules Elf Bot - Dec 9, 2011 4:50

Originally posted by [b]Ind[/b]
need confirmation to know whether this happens on officials. thanks

Hercules Elf Bot - Mar 23, 2012 11:26

Originally posted by [b]Ind[/b]
was fixed by me few months ago.