Repository navigation
fix(creatures): a stopped mover no longer snaps back behind the client - #603
Conversation
…last firing A stop between two advance firings wrote the position the last firing stored. The client had already moved on, so the mover snapped back. Since the leg advance persist gate, an out-of-combat creature's stored row can lag its leg by up to 4 yd, so the death stop could land that far short. creatures::tick::stop_where_rendered computes the point the advance phase would commit at the stop time, moves the row there and sends the zero-duration stop at the same point. The creature death stop uses it. A Package runner stop can use it too. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe stop helper places a moving creature at its client-rendered position and emits a zero-duration stop spline. Creature death uses this helper before resolving loot entitlement. Tests cover route positions, obstruction handling, and corpse position after death. ChangesRendered-Position Stops
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The documented stop and persistence behavior is consistent with its caller; no confirmed issue blocks merging. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change keeps existing gameplay authority and makes corpse positioning consistent with movement. No introduced security vulnerability was established in the reviewed flow. Failure recovery and the separate movement-runner migration remain incompletely verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 77.42% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 31 functions across 6 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code review: Standards and SpecReviewed The core fix is correct. StandardsNo hard violations of
Spec
Summary: Standards 6 findings, worst is Character used for a creature in the unit tests (medium). Spec 5 findings plus 1 note, worst is that the bot runner stop from #570 is still unfixed until the packages PR lands (medium, expected). Generated by Claude Code |
The stop between firings now follows the leg advance rules. A blocked Route Path segment or changed navigation inputs keep the halt point, so a stop never lands past an obstruction. A stop on a Route Path faces the next waypoint, as the advance does. The death stop now runs before the Loot Tag and rewards read the corpse position. The spline id floor is a pure function with a same-millisecond test, and a new test covers a stop that crosses a cell edge. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Addressed in 070177b, with the independent review's findings. Fixed:
Not changed:
Ran locally: |
… stop commit_position now asks LegInFlight::heading_on_path for its heading, the same call a stop makes, so the two cannot disagree on facing. The death-order test now also requires the stop before the Loot Tag reads the corpse position. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The Module moves a mover along its leg only on the 500 ms creature tick. A stop between two firings wrote the position the last firing stored. The client had already drawn the mover further on, so it snapped back. The runner stop in the playerbots Package and Core's creature death stop both did this.
Since #587 the gap is larger for a creature out of combat: its stored row can lag the leg by up to 4 yd. A durable test on unchanged
mainstopped a dead wolf 3.9 yd short of where the client drew it.creatures::tick::stop_where_renderednow stops the mover by the rules a leg advance follows at the stop time. It takes the point from the tick's ownrendered_atmodel, so a Route Path continues into the next waypoint segment and clamps at its end, and it faces the next waypoint. If the advance would halt the path (a blocked segment or changed navigation inputs), the stop keeps the halt point, so it never lands past an obstruction. It moves the row there, with grid address and cell, and sends the zero-duration stop at the same point. The stored position and the stop packet always agree.The creature death stop uses it, before the Loot Tag and the rewards read the corpse position. The Package runner must switch to it in a separate packages PR.
Tests:
cycle::stop_on_leg: a stop after a Route Path segment ends (point and heading), a stop after the path ends, an obstructed path, and a non-finite leg.stop_between_firingsunit tests: a stop that crosses a cell edge writes the new grid address and cell, a stop without a heading keeps the facing, and the spline id rises within one millisecond.creature_death_stopdurable test: kills a walking wolf between firings and checks the corpse rests on the interpolated point, before and after the stop leg plays. It fails onmain.stop_on_stored_leg.What a human should check in a client, after the packages change lands: watch a bot on a Route Path that stops or retargets right after it passes a waypoint, and kill a patrolling creature mid-walk. Neither should jump back when it stops.
Refs #570
Authored by Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Documentation