docs+test(physics): retire stale TS-1 row; file AD-53/AD-54 for its two acdream-only branches
Campaign P Slice P2 step 1 (docs/research/2026-07-30-response-layer-edge-family-pseudocode.md §2, §6 Step 1/2). The TS-1 register row (retail-divergence-register.md:238) described work that is already done: SpherePath.PrecipiceSlide, Transition.CliffSlide, and Transition.EdgeSlideAfterStepDownFailed are real, tested ports of retail's edge_slide -> precipice_slide/cliff_slide chain (pc:274316, pc:272397, pc:273001-273090). Its cited :1254 line was stale stepping-loop code the file moved past. The one real remaining gap (the back-probe fallback skipping retail's walkable_check_pos/localspace_sphere recache before its second precipice_slide call, pc:274318-274326 / 0050b4e0-0050b507) needed no production code change: a fresh read of SPHEREPATH::get_walkable_pos (0050a8f0), cache_localspace_sphere (0050c9d0), and set_walkable_check_pos (00509ce0) shows that machinery exists to re-project a sphere across retail's PER-CELL local coordinate frames. acdream's SpherePath.WalkableVertices and GlobalSphere are populated in UNIFIED WORLD SPACE at assignment time (SetWalkable/SetWalkableTransformed, SetCheckPos/RestoreCheckPos), so both operands BSPQuery.FindCrossedEdge compares are already commensurable -- retail's recache is a no-op correction under this architecture, and FindCrossedEdge never reads a sphere radius, so retail's walkable_scale radius correction has no acdream counterpart either. Documented in-code at the back-probe site with full citations, and pinned with EdgeSlideBackProbePrecipiceSlideTests: a walkable polygon rediscovered near GlobalCurrCenter, tested against GlobalSphere[0] restored to the original failed target, crosses the edge and slides -- it does not wedge into Collided (and the inverse case, standing inside the polygon with no edge crossed, correctly still returns Collided matching retail's own precipice_slide on a false find_crossed_edge). TS-1's other two flagged gaps are real acdream-only compensating branches, not retail reads, and get their own rows rather than being silently retired alongside it: - AD-53: CliffSlide's three-source reference-normal fallback chain (LastWalkablePlane -> LastKnownContactPlane -> world-up) vs retail's direct last_known_contact_plane.N use. A fresh read of last_known_contact_plane's maintenance (pc:272659-272668) confirms retail overwrites it unconditionally every validate_transition pass, including with a steep plane -- so the fallback chain compensates for AP-4's incomplete OnWalkable bookkeeping, not a retail-matching read. - AD-54: the walkable-steepness reroute to CliffSlide before PrecipiceSlide when the stored walkable polygon itself is steeper than FloorZ. Retail's raw edge_slide has no such branch; the permissive LandingZ acceptance that makes this state reachable IS retail-faithful (TS-4's own BSPTREE::find_collisions citation), but whether retail's outer transitional_insert retry loop absorbs the resulting COLLIDED_TS some other way is not yet independently verified -- flagged open in the row. Physics test suite: 1836 passed, 1 skipped (D4, unrelated to this change). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
3a4782048e
commit
325fee7cbb
3 changed files with 223 additions and 9 deletions
|
|
@ -1985,6 +1985,23 @@ public sealed class Transition
|
|||
// PrecipiceSlide. CliffSlide deflects motion along the ridge
|
||||
// between current-steep and last-known-walkable; gravity then
|
||||
// produces visible downhill drift.
|
||||
//
|
||||
// TS-1 gap #3 (register AD-54, Campaign P Slice P2 2026-07-30):
|
||||
// retail's raw SPHEREPATH::edge_slide has NO steepness branch here
|
||||
// — `if (walkable != null) { ... precipice_slide(...) }` unconditionally
|
||||
// (acclient_2013_pseudo_c.txt:364-370 per the P2 research quote). The
|
||||
// LandingZ permissive acceptance itself IS retail-faithful — confirmed
|
||||
// by TransitionalInsert's own Path-4 Collide branch
|
||||
// (TransitionTypes.cs, `DoCheckWalkable(PhysicsGlobals.LandingZ, engine)`
|
||||
// above) and TS-4's BSPTREE::find_collisions read
|
||||
// (pc:323740-323783: `sphere_path.walkable_allowance = LandingZ`
|
||||
// unconditionally, no slope test) — so a steep roof really is
|
||||
// "walkable" in retail too. What is NOT independently verified from
|
||||
// the raw decomp is whether retail's OUTER caller (transitional_insert)
|
||||
// absorbs a same-polygon-standing Collided from precipice_slide via
|
||||
// its own retry loop rather than needing this reroute; see
|
||||
// docs/research/2026-07-30-response-layer-edge-family-pseudocode.md §2
|
||||
// gap #3.
|
||||
if (sp.WalkablePlane.Normal.Z < PhysicsGlobals.FloorZ)
|
||||
{
|
||||
var cliffPlane = sp.WalkablePlane;
|
||||
|
|
@ -2015,6 +2032,32 @@ public sealed class Transition
|
|||
// Retail back-probes from the current sphere center to rediscover the
|
||||
// walkable polygon we just left, then restores the failed candidate and
|
||||
// runs precipice_slide against that polygon.
|
||||
//
|
||||
// TS-1 gap #1 research (Campaign P Slice P2, 2026-07-30,
|
||||
// docs/research/2026-07-30-response-layer-edge-family-pseudocode.md §2):
|
||||
// retail's SPHEREPATH::edge_slide back-probe branch re-caches
|
||||
// walkable_check_pos/localspace_sphere here — SPHEREPATH::get_walkable_pos
|
||||
// (0050a8f0) -> SPHEREPATH::cache_localspace_sphere (0050c9d0) ->
|
||||
// SPHEREPATH::set_walkable_check_pos (00509ce0), acclient_2013_pseudo_c.txt
|
||||
// :274318-274326 (0050b4e0-0050b507) — before its second precipice_slide
|
||||
// call. That machinery re-projects the restored check_pos sphere into the
|
||||
// walkable polygon's OWN per-cell local frame via Position::localtolocal,
|
||||
// and precipice_slide itself then applies a LandDefs::get_block_offset
|
||||
// landblock correction (pc:274341) before testing find_crossed_edge.
|
||||
// Deliberately NOT ported here: acdream's SpherePath.WalkableVertices/
|
||||
// WalkablePlane are populated in UNIFIED WORLD SPACE at assignment time
|
||||
// (SetWalkable/SetWalkableTransformed above bake worldOrigin+scale in
|
||||
// immediately), and GlobalSphere is likewise always world-space
|
||||
// (SetCheckPos/RestoreCheckPos). Both operands BSPQuery.FindCrossedEdge
|
||||
// compares are therefore already commensurable with no landblock/cell
|
||||
// reprojection needed — retail's local-frame recache is a no-op
|
||||
// correction under this architecture, and FindCrossedEdge never reads a
|
||||
// sphere radius, so retail's walkable_scale radius correction has no
|
||||
// acdream counterpart either. Pinned by
|
||||
// EdgeSlideBackProbePrecipiceSlideTests (direct SpherePath.PrecipiceSlide
|
||||
// state test): a walkable polygon rediscovered near GlobalCurrCenter,
|
||||
// tested against GlobalSphere[0] restored to the original failed target,
|
||||
// crosses the edge and slides — it does not wedge into Collided.
|
||||
Vector3 backToCurrent = sp.GlobalCurrCenter[0].Origin - sp.GlobalSphere[0].Origin;
|
||||
sp.AddOffsetToCheckPos(backToCurrent);
|
||||
|
||||
|
|
@ -2048,6 +2091,25 @@ public sealed class Transition
|
|||
// deflection. Using LastWalkable preserves the prior flat-ground
|
||||
// plane across continuous-slope frames; world-up gives a guaranteed
|
||||
// non-zero deflection when no walkable history exists at all.
|
||||
//
|
||||
// TS-1 gap #2 (register AD-53, Campaign P Slice P2 2026-07-30): retail's
|
||||
// raw CTransition::cliff_slide (pc:272397, 0050a6d0) uses
|
||||
// this->collision_info.last_known_contact_plane.N DIRECTLY as the second
|
||||
// cross-product operand — no fallback chain. Confirmed by a fresh read of
|
||||
// last_known_contact_plane's own maintenance
|
||||
// (acclient_2013_pseudo_c.txt:272659-272668, pc ~0050ad07): retail
|
||||
// overwrites last_known_contact_plane from contact_plane UNCONDITIONALLY
|
||||
// on every validate_transition pass, the same "gets overwritten by
|
||||
// whatever's current, including a steep plane" behavior this file's
|
||||
// ContactPlane/LastKnownContactPlane tracking already has — retail does
|
||||
// NOT maintain a separately-preserved flat-ground history there either.
|
||||
// This three-source chain (LastWalkablePlane -> LastKnownContactPlane ->
|
||||
// UnitZ) is therefore a genuine acdream invention, not a retail-matching
|
||||
// read — kept because it compensates for AP-4's incomplete OnWalkable
|
||||
// bookkeeping (see DO-NOT-RETRY item 9 in
|
||||
// docs/research/2026-07-30-response-layer-edge-family-pseudocode.md §0)
|
||||
// and removing it reintroduces the degenerate-cross "stay on the roof"
|
||||
// wedge the L.4 session (2026-04-30) fought. See that doc's §2 gap #2.
|
||||
Vector3 referenceNormal;
|
||||
string refSource;
|
||||
if (sp.HasLastWalkablePolygon && sp.LastWalkablePlane.Normal.Z >= PhysicsGlobals.FloorZ)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue