Skip to content

fix(creatures): a renewed path starts from the stored point, not where the client draws the mover #608

Closed

Description

@Mathih13

This was generated by AI during triage.

#570 fixed the snap-back when a mover stops between creature ticks (#603, packages #61). A related gap remains when a moving bot's path is renewed instead of stopped.

emit_creature_path (module/src/creatures/tick/mod.rs) starts the new leg at the mover's stored position. Since the persist rule in #587 (advance_needs_persist, 4 yd), the stored position can lag the rendered one by up to 4 yd for an out-of-combat creature, and by up to one 500 ms tick for a Character. When the runner renews a path mid-leg (the playerbots begin() path in runner/movement.rs), the new spline starts behind the point the client shows, and the client can snap the mover back.

Done when: a path renewal mid-leg starts the new spline from the point along the old leg at the renewal time (the same stop_on_leg rule stop_where_rendered uses, including the obstruction check). A test renews a path between ticks and asserts the new spline's start equals the rendered point.

Found in the review of packages #61.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions