Skip to content

A scripted creature's move stores its destination before the client arrives #613

Closed

Description

@Mathih13

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.

Activity

  1. Mathih13 commented on Oct 5, 2026

    @Mathih13
    ContributorAuthor

    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.
  2. added
    bugSomething isn't working
    P2normal
    ready-for-agentComplete enough to build from the issue alone, by a person or their agent
    and removed
    ready-for-agentComplete enough to build from the issue alone, by a person or their agent
    on Oct 7, 2026
  3. 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
  4. added
    in progressTaken: someone is working on it or a pull request is open. Pick another issue.
    on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2normalbugSomething isn't workingin progressTaken: someone is working on it or a pull request is open. Pick another issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions