Jump to content
  • 0

Question

Posted (edited)

hello everyone im having a problem regarding @refresh i removed the fade time to 0 then here's the scenario when i try to click my mouse to the desire location and using @refresh i feel like im teleporting can anyone have some modification for this or any experience and how you fix it thank you! im using 2018-06-21aRagexeRE ragnarok.log 
as you can see in the video i try to press the @refresh 3x and it looks like teleporting until i get to the location ive click
 

Quote

/*==========================================
 * @refresh (like @jumpto <<yourself>>)
 *------------------------------------------*/
ACMD_FUNC(refresh)
{
    nullpo_retr(-1, sd);
    clif_refresh(sd);
    return 0;
}

ACMD_FUNC(refreshall)
{
    struct map_session_data* iter_sd;
    struct s_mapiterator* iter;
    nullpo_retr(-1, sd);

    iter = mapit_getallusers();
    for (iter_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); iter_sd = (TBL_PC*)mapit_next(iter))
        clif_refresh(iter_sd);
    mapit_free(iter);
    return 0;
}

/*==========================================

Edited by GM Winter

4 answers to this question

Recommended Posts

  • 0
Posted
4 hours ago, GM Winter said:

hello everyone im having a problem regarding @refresh i remove the fade time to 0 then heres the senario when i try to click my mouse to the desire location and using @refresh i feel like im teleporting can anyone have some modification for this or any experience and how you fix it thank you!

Try to diff new exe with the refresh delay 

  • 0
Posted

That's normal. It doesn't really make sense to send a new walking packet for your own character after using @refresh. But you can forcefully send it again in the clif_refresh function (in clif.cpp). Just add the following at the end of the function.

	struct unit_data* ud = unit_bl2ud(&sd->bl);

	if (ud && ud->walktimer != INVALID_TIMER) {
		unit_walktoxy(&sd->bl, ud->to_x, ud->to_y, 4);
	}

Though, it will look a tad weird because the character has to walk from a center cell, so it will "walk back" when using @refresh. You could also send a "unit_stop_walking(&sd->bl, USW_NONE);" if you want the character to stop moving instead. Whichever you prefer.

  • Upvote 1
  • MVP 1
  • 0
Posted (edited)
1 hour ago, Tokei said:

That's normal. It doesn't really make sense to send a new walking packet for your own character after using @refresh. But you can forcefully send it again in the clif_refresh function (in clif.cpp). Just add the following at the end of the function.

	struct unit_data* ud = unit_bl2ud(&sd->bl);

	if (ud && ud->walktimer != INVALID_TIMER) {
		unit_walktoxy(&sd->bl, ud->to_x, ud->to_y, 4);
	}

Though, it will look a tad weird because the character has to walk from a center cell, so it will "walk back" when using @refresh. You could also send a "unit_stop_walking(&sd->bl, USW_NONE);" if you want the character to stop moving instead. Whichever you prefer.

Hello thank you so much !
 

Edited by GM Winter
  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...