You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A scripted creature's move stores its destination before the client arrives #613
Expected. When a Character or Gate reads a creature's stored position, it matches where the client is drawn, the same way every other movement emitter in the Module works: the row holds the leg's start, and the creature tick advances it.
Actual (at 87109e3c). encounter::move_to_point sends the spline and then writes the destination straight into game_world_entity in the same call (encounter.rs#L766-L828). The client walks there over dist / speed seconds, but every reader, range, line of sight, aggro, AOI cell membership, and the start of the next leg or a stop, sees the end point for the whole walk.
How it shows. A stop or a new path mid-leg starts from the destination the mover has not reached yet, so the client sees it jump forward. The legacy walk_toward in the packages repo's goals.rs has the same pattern and is not covered by this issue.
Fix direction. Make move_to_point store the leg start the way creatures::tick::advance_needs_persist and the other emitters do, and let the creature tick move the row forward. Reuse the shared leg-start and spline-id helpers instead of repeating them.
Open PR #617 closes this issue: it stores the leg start, moves the shared Row/number/LEG_YD test helpers into module/tests/support, and adds encounter_move.rs. It does not touch the packages walk_toward duplicate, which is tracked separately as LyraCoreProject/packages#66.
Add these from the reviews of #612 to the same change:
module/tests/creature_path_renewal.rs: assert that the stored row lags the drawn point before the renewal, so the test proves the bug. Then assert that the stored x, y, z equal the new start after it, as assert_stored_at does in creature_death_stop.
Row, number and LEG_YD are now copied in creature_death_stop.rs, creature_advance_persist.rs and creature_path_renewal.rs. Move them to module/tests/support.
move_to_point and world::teleport_player repeat the next_spline_id rule by hand. Use the shared helper.
changed the title [-]fix(encounter): move_to_point stores the mover at the destination when the leg starts[/-][+]A scripted creature's move stores its destination before the client arrives[/+]on Oct 8, 2026
Activity
Mathih13 commentedon Oct 5, 2026
Add these from the reviews of #612 to the same change:
module/tests/creature_path_renewal.rs: assert that the stored row lags the drawn point before the renewal, so the test proves the bug. Then assert that the storedx,y,zequal the new start after it, asassert_stored_atdoes increature_death_stop.Row,numberandLEG_YDare now copied increature_death_stop.rs,creature_advance_persist.rsandcreature_path_renewal.rs. Move them tomodule/tests/support.move_to_pointandworld::teleport_playerrepeat thenext_spline_idrule by hand. Use the shared helper.[-]fix(encounter): move_to_point stores the mover at the destination when the leg starts[/-][+]A scripted creature's move stores its destination before the client arrives[/+]