feat(R3-W4): ground transitions + lifecycle verbatim; K-fix18 DELETED (closes J8, J10, J11-shape, J12, J13, J18, J19)
Core (dedicated agent, independently reviewed): HitGround 0x00528ac0 / LeaveGround 0x00528b00 verbatim (creature+gravity gates, the RemoveLinkAnimations seam — K-fix18's retail mechanism — velocity via GetLeaveGroundVelocity with the autonomous flag, jump-state resets, apply_current_movement re-sync); enter_default_state 0x00528c80 per A8 (fresh states, InitializeMotionTables seam, sentinel APPENDED without draining pending_motions — pinned, Initted=1, LeaveGround tail); Initted gates; the A3 IsThePlayer dual dispatch in apply_current_movement / ReportExhaustion / SetWeenieObject / SetPhysicsObject (a remote player routes INTERPRETED — the ACE-divergence pin); set_hold_run 0x00528b70 + SetHoldKey 0x00528bb0 (XOR guard, None-only-from-Run); adjust_motion creature guard wired (TS-34 retired); PhysicsBody.LastMoveWasAutonomous + set_local_velocity(autonomous). Port discovery: retail's apply_raw_movement 0x005287e0 / apply_interpreted_movement 0x00528600 ARE the already-shipped D6.2a/funnel functions — the dual dispatch composes them instead of duplicating. App cutover (orchestrator): the skipTransitionLink flag + both K-fix18 call sites DELETED (AP-74 retired). MotionInterpreter.DefaultSink routes apply_current_movement's interpreted branch through the REAL funnel dispatch when a sink is bound — so a remote's LeaveGround engages Falling via the contact-gated funnel, replacing the forced SetCycle (J19); the per-remote MotionTableDispatchSink is now PERSISTENT (EnsureRemoteMotionBindings: DefaultSink + RemoveLinkAnimations + InitializeMotionTables seams, idempotent from both the UM and VectorUpdate paths; wire velocity re-applied after LeaveGround so it stays authoritative). Player: seams bound to the player sequencer; the controller's grounded→airborne EDGE now fires LeaveGround (jump() clears OnWalkable and the same frame's transition detection fires it — retail's order; walk-off-a-ledge gets the momentum fallback + link strip it never had); the manual jump-block LeaveGround deleted; LastMoveWasAutonomous set at the controller chokepoint (W6 refines). Trace S8 re-expressed as the retail mechanism (Falling dispatch + RemoveAllLinkAnimations = same final state the flag produced). 43 new lifecycle tests. Registers: TS-34 + AP-74 retired; TS-38, AP-77, AP-78 added. Full suite: 3,665 passed. Live smoke: in-world clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
af4764443f
commit
e214acdf23
8 changed files with 1575 additions and 124 deletions
|
|
@ -353,6 +353,11 @@ public sealed class PlayerMovementController
|
|||
int jumpSkill = int.TryParse(Environment.GetEnvironmentVariable("ACDREAM_JUMP_SKILL"), out var jsv) ? jsv : 300;
|
||||
_weenie = new PlayerWeenie(runSkill: runSkill, jumpSkill: jumpSkill);
|
||||
_motion = new MotionInterpreter(_body, _weenie);
|
||||
// R3-W4 (A3): the local player's movement is input-driven —
|
||||
// movement_is_autonomous true so apply_current_movement's dual
|
||||
// dispatch routes apply_raw_movement (IsThePlayer && autonomous).
|
||||
// R3-W6 refines this per-motion (server-controlled MoveTo clears it).
|
||||
_body.LastMoveWasAutonomous = true;
|
||||
}
|
||||
|
||||
public void SetCharacterSkills(int runSkill, int jumpSkill)
|
||||
|
|
@ -1008,12 +1013,13 @@ public sealed class PlayerMovementController
|
|||
var jumpResult = _motion.jump(_jumpExtent);
|
||||
if (jumpResult == WeenieError.None)
|
||||
{
|
||||
// Capture jump_v_z BEFORE LeaveGround() — that call resets
|
||||
// JumpExtent back to 0 (faithful to retail's FUN_00529710),
|
||||
// after which GetJumpVZ() returns 0 because the extent
|
||||
// gate at the top of the function fires.
|
||||
// R3-W4 (J7): the manual LeaveGround call is DELETED —
|
||||
// jump() clears OnWalkable, and the SAME frame's
|
||||
// grounded→airborne edge (section 5's transition detection)
|
||||
// fires _motion.LeaveGround() exactly where retail's
|
||||
// transition sweep does. Capture jump_v_z NOW: the edge's
|
||||
// LeaveGround resets JumpExtent to 0 later this frame.
|
||||
float jumpVz = _motion.GetJumpVZ();
|
||||
_motion.LeaveGround();
|
||||
outJumpExtent = _jumpExtent;
|
||||
// D6.2: get_state_velocity() is now correct for all directions
|
||||
// (apply_raw_movement normalized backward/strafe above), so the
|
||||
|
|
@ -1266,6 +1272,16 @@ public sealed class PlayerMovementController
|
|||
}
|
||||
|
||||
|
||||
// R3-W4 (J7/J8): the grounded→airborne EDGE fires retail's
|
||||
// LeaveGround (0x00528b00) — jump launches (jump() cleared
|
||||
// OnWalkable earlier this frame) AND walk-off-a-ledge both route
|
||||
// here, replacing the old manual jump-block call (and giving
|
||||
// ledge departures the momentum fallback + link strip they never
|
||||
// had). Edge = grounded last frame, airborne now; the landing
|
||||
// branch above already fires HitGround on the opposite edge.
|
||||
if (!_body.OnWalkable && !_wasAirborneLastFrame)
|
||||
_motion.LeaveGround();
|
||||
|
||||
_wasAirborneLastFrame = !_body.OnWalkable;
|
||||
UpdateCellId(resolveResult.CellId, "resolver");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue