Skip to content

Fix stale marker projection origins and vanilla waypoint direction - #42

Open
Blamp26 wants to merge 1 commit into
timas130:mainfrom
Blamp26:fix/marker-projection
Open

Blamp26 wants to merge 1 commit into
timas130:mainfrom
Blamp26:fix/marker-projection

Conversation

@Blamp26

@Blamp26 Blamp26 commented Sep 9, 2026

Copy link
Copy Markdown

Player markers could point to incorrect locations for two related reasons:

  1. lastUpdatePosition was shared by every mod-provided marker. Server payloads are incremental, so receiving an update for one marker changed the projection origin used by older markers that were not part of that packet. Those markers could therefore snap or drift even though their own relative location had not been updated.

  2. Vanilla waypoints were fed through the same projection path even though getVanillaWaypoints() already recalculates their direction against the current camera every frame. Treating that live direction as an offset from lastUpdatePosition could produce an incorrect direction.

This change stores the local player position alongside each mod-provided marker update instead of using one global origin.

Vanilla waypoints use their already-current direction directly instead of being projected from a stored origin.

Nearby loaded entities still use their real interpolated entity position, and sendDistance=false keeps the existing direct-direction behavior.

No network protocol or server-side changes are required.

Validation

  • ./gradlew build passes locally on Java 25.
  • git diff --check passes.
  • Only PlayerLocatorPlusClient.kt is changed.

Manual checks worth doing

  • Two or more far-away players: an update for one marker should no longer move another stale marker.
  • Vanilla waypoints: moving/rotating should keep the marker pointed at the correct direction.
  • Nearby players inside entity tracking distance should still use their real entity position.
  • sendDistance=false should keep its existing behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant