Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Casting Position Bug #1001

Closed
kyeme opened this issue Dec 21, 2015 · 9 comments
Closed

Casting Position Bug #1001

kyeme opened this issue Dec 21, 2015 · 9 comments
Labels
component:core Affecting the Hercules core (i.e. not the game mechanics directly) type:bug Issue is a bug or describes an incorrect behavior that should be fixed

Comments

@kyeme
Copy link

kyeme commented Dec 21, 2015

Whenever I click on a cell and I cast a self -skill before stepping on that certain cell my charactter goes back to the cell where I was.

Video: https://youtu.be/PVRk7I59dmw

Bug tracker: http://herc.ws/board/index.php?app=tracker&showissue=7255

@Playtester
Copy link

I kind of have implemented the functionality needed for this with stepaction already...

    // Remember the skill request from the client while walking to the next cell
    if(src->type == BL_PC && ud->walktimer != INVALID_TIMER && !battle->check_range(src, target, range-1)) {
        ud->stepaction = true;
        ud->target_to = target_id;
        ud->stepskill_id = skill_id;
        ud->stepskill_lv = skill_lv;
        return 0; // Attacking will be handled by unit_walktoxy_timer in this case
    }

But I didn't want it to apply unless when absolutely necessary, because of the complex timer mechanics that are involved with that, so I only did when you cast while the target is not in range (battle->check_range). If you removed that check it would always apply. Of course for self skills, the target is always in range.

Problem is that unlike using a skill outside skill range where you can be sure that the client itself will make sure you stop one cell later, if you cast a self spell while moving, you will continue walking after reaching the next cell, so if your latency is high, you will still see yourself moving to the next cell...

I tried to solve this by sending the client a move packet saying that the path was shortened, but the client ignored it. =/

Alternatively, one could simply remove the fixpos when stopping because of casting, but might create position lag. With fixpos it looks funny but at least you can tell on which cell the server considers you to be on.

@MishimaHaruna MishimaHaruna added type:bug Issue is a bug or describes an incorrect behavior that should be fixed component:core Affecting the Hercules core (i.e. not the game mechanics directly) labels Mar 15, 2016
@stealth62
Copy link

Hello dev :) any update for this?

@Playtester
Copy link

For rAthena I decided to keep it as it is. On official servers you are also pulled back to the previous cell but it doesn't send a fixpos packet so it just causes position lag. I rather have the real position show.

@stealth62
Copy link

I see. Sir @Playtester can you help me how to do that not sending a fixpos packet?

@stealth62
Copy link

In my testing Sir @Playtester in unit.c

int unit_stop_walking(struct block_list *bl,int type)

i comment the line to disable it

//clif_fixpos(bl);  // i dont know if commenting this line is safe

Then my character didn't back to the cell where I was when im casting a skills. Like you said it causes position lag on high latency server. Commenting the line i dont know if its safe or this is the line your pointing out?. If you have any method sir please help. Thank you very much.

@Playtester
Copy link

It's better if you go to unit.c --> unit_skilluse_id2

And change:

    if(!ud->state.running) // Need TK_RUN or WUGDASH handler to be done before that, see bugreport:6026
        unit_stop_walking(src, 1); // Even though this is not how official works but this will do the trick. bugreport:6829

To:

    if(!ud->state.running) // Need TK_RUN or WUGDASH handler to be done before that, see bugreport:6026
        unit_stop_walking(src, 0);

Then it doesn't affect other situations.

(Note: This is rAthena code.)

@stealth62
Copy link

Thank you very much sir @Playtester it works for me. this is what im looking for long time ago :)

@kyeme
Copy link
Author

kyeme commented Mar 26, 2016

@MishimaHaruna @malufett

@Kenpachi2k13
Copy link
Member

Kenpachi2k13 commented May 7, 2020

I can confirm that Aegis either pushes you back to the previous cell, but shows the coordinates of next cell when using /where or does not push you back the previous cell but shows the coordinates of previous cell when using /where.
In both cases the character's position is corrupted.
I agree with @Playtester that keeping the character's position uncorrupted is more important, so there's nothing to "fix" here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:core Affecting the Hercules core (i.e. not the game mechanics directly) type:bug Issue is a bug or describes an incorrect behavior that should be fixed
Projects
None yet
Development

No branches or pull requests

5 participants