fix: always send temp move speed on telejump - #157
Open
reldo-dev wants to merge 1 commit into
Open
Conversation
Telejump resolves to MoveSpeed.Stationary (127), which is what tells the client to snap to the destination instead of walking to it. It was only sent when the resolved speed differed from cachedMoveSpeed, but that stays Stationary until the player's first move, so teleporting before taking a step never sends it. Taking one step first assigns Walk and hides the bug. Fixes OpenRune#151.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Teleporting before taking a step after logging in leaves the player walking to the destination instead of jumping to it, as reported in #151.
telejumpresolves toMoveSpeed.Stationary(127), which is what tells the client to snap rather than interpolate. It was only transmitted when the resolved speed differed fromcachedMoveSpeed, and that staysStationaryuntilPlayerMovementProcessorconsumes the player's first route, so the marker was dropped for anyone who had not moved yet. Taking a single step assignsWalk, which is why walking first appears to fix it.Verified on revision 240 by logging the values at the call site while teleporting in a client. Before the change, a teleport with no prior movement resolved
Stationaryagainst a cachedStationaryand skipped the block; after it, the same teleport transmits. A teleport taken after one step transmitted in both cases.How visible this is depends on the distance: without the marker the client interpolates towards the destination, so a short teleport looks like a slow slide and a level change drops the plane first, while a teleport outside the loaded scene still snaps because the client falls back to a hard reset.
Fixes #151.