Repository navigation
fix(creatures): start a renewed path where the client draws the mover - #612
Conversation
emit_creature_path started the new leg at the mover's stored position. The stored row can lag the leg by up to 4 yd for an out-of-combat creature and by one firing for a Character, so a renewal between two advance firings sent the client back along the old leg. The path now starts at the point stop_where_rendered would stop the mover at, including the obstruction check, and takes a spline id newer than the leg it replaces. Both share place_where_rendered. debug_creature_path drives emit_creature_path on a test shard, and creature_path_renewal renews a path mid-leg and checks the new start. Closes #608 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 47 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (7)
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: 8b4095a against
|
|
An independent Opus review and the routine review found nothing that blocks merge. I moved the low findings to follow-ups so this PR doesn't need another CI round:
|
A bot that gets a new Route Path while it walks can jump back on the client. The new path starts at the mover's stored position. That position can lag the point the client draws by up to 4 yd for an out-of-combat creature, and by one 500 ms firing for a Character. So the new spline starts behind the mover and the client moves it back. #603 fixed this for a stop. A renewal through
emit_creature_pathstill had the gap.emit_creature_pathnow starts the path at the same pointstop_where_renderedstops at. It uses the samestop_on_legrule, with the obstruction check. The two functions share a small helper,place_where_rendered. The new leg also takes a spline id newer than the leg it replaces, so the client does not drop a renewal made in the same millisecond.Only the playerbots runner calls
emit_creature_path, so the test needs a way in. I added the debug reducerdebug_creature_pathand regenerated its Gateway binding. Creature legs that the behavior cycle sends already start at the right point, because the leg advance runs first in the same firing.Verification (macOS, local SpacetimeDB 2.7.1):
creature_path_renewal::a_path_renewed_mid_leg_starts_where_the_client_renders_the_mover(new durable test). Before the fix it failed: the renewed path started at x = -8949.176 and the client drew the wolf at -8949.447. With the fix it passes.creature_death_stoppasses.cargo test -p lyracore-module --lib --features=debug_reducers creatures::: 389 passed.cargo clippy -p lyracore-module --all-targets --features debug_reducers -- -D warningsandcargo fmt --all -- --checkare clean.scripts/check-gateway-bindings.pyon the regenerated tree: all 1166 binding files are current.Packages needs no change. The runner's
begin()still plans the route from the stored position. The first waypoint can be a short distance behind the new start, but the client no longer jumps back.Closes #608
Model and harness: Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code