Revert "fix(physics): TS-4 retired — Path-6 steep-poly shortcut deleted"
This reverts commit 5e2be19b4e.
This commit is contained in:
parent
2e27d066e8
commit
a8a7d64b47
5 changed files with 156 additions and 254 deletions
|
|
@ -2034,18 +2034,24 @@ internal static class FlatBspQuery
|
|||
localToWorld);
|
||||
}
|
||||
|
||||
// TS-4 RETIRED (Campaign P final physics slice, 2026-07-30;
|
||||
// docs/research/2026-07-30-ts4-116-oracle-plan.md §1, §4 item 2).
|
||||
// Retail's BSP layer has no steepness test at this layer at all
|
||||
// (acclient_2013_pseudo_c.txt:323783-323821, 0x0053a793) — every
|
||||
// hit (steep or shallow) falls through to the same unconditional
|
||||
// SetCollide. The old L.4 slide-tangent shortcut (worldNormal0.Z
|
||||
// < FloorZ -> project-and-Slid with its own SetSlidingNormal
|
||||
// write) is deleted; see BSPQuery.cs's Path 6 for the mirrored
|
||||
// fix and full citation. Kept in parity with BSPQuery.cs per the
|
||||
// FlatBspQueryDifferentialTests graph-vs-flat comparison.
|
||||
Vector3 worldNormal0 = LocalToWorld(
|
||||
tree.PolygonTable.Polygons[defaultHitPolygonIndex0].Plane.Normal);
|
||||
if (worldNormal0.Z < PhysicsGlobals.FloorZ)
|
||||
{
|
||||
Vector3 currentWorld =
|
||||
path.GlobalCurrCenter[0].Origin;
|
||||
Vector3 endWorld =
|
||||
path.GlobalSphere[0].Origin;
|
||||
Vector3 globalDelta = endWorld - currentWorld;
|
||||
float difference = Vector3.Dot(worldNormal0, globalDelta);
|
||||
if (difference < 0f)
|
||||
path.AddOffsetToCheckPos(-worldNormal0 * difference);
|
||||
|
||||
collisions.SetCollisionNormal(worldNormal0);
|
||||
collisions.SetSlidingNormal(worldNormal0);
|
||||
RecordDiagnosticHit(tree, defaultHitPolygonIndex0);
|
||||
return TransitionState.Slid;
|
||||
}
|
||||
|
||||
path.SetCollide(worldNormal0);
|
||||
path.WalkableAllowance = PhysicsGlobals.LandingZ;
|
||||
|
|
@ -2067,22 +2073,30 @@ internal static class FlatBspQuery
|
|||
|
||||
if (defaultHit1 || defaultHitPolygonIndex1 >= 0)
|
||||
{
|
||||
// #116 shape-1 fix (Campaign P final physics slice,
|
||||
// 2026-07-30; docs/research/2026-07-30-ts4-116-oracle-plan.md
|
||||
// §2.3-§2.4). Retail's airborne (not-yet-Contact)
|
||||
// find_collisions dispatch, when the FOOT sphere is
|
||||
// completely clear but the HEAD sphere hits or near-misses,
|
||||
// records the head polygon's normal directly and hard-stops
|
||||
// rather than deferring through SetCollide/Adjusted:
|
||||
// pc:323824-323834 (0x0053a793/0x0053a7a4), cross-checked
|
||||
// against ACE BSPTree.cs:221-230. See BSPQuery.cs's Path 6
|
||||
// for the mirrored fix and full citation.
|
||||
Vector3 worldNormal1 = LocalToWorld(
|
||||
tree.PolygonTable.Polygons[defaultHitPolygonIndex1].Plane.Normal);
|
||||
if (worldNormal1.Z < PhysicsGlobals.FloorZ)
|
||||
{
|
||||
Vector3 currentWorld =
|
||||
path.GlobalCurrCenter[0].Origin;
|
||||
Vector3 endWorld =
|
||||
path.GlobalSphere[0].Origin;
|
||||
Vector3 globalDelta = endWorld - currentWorld;
|
||||
float difference =
|
||||
Vector3.Dot(worldNormal1, globalDelta);
|
||||
if (difference < 0f)
|
||||
path.AddOffsetToCheckPos(-worldNormal1 * difference);
|
||||
|
||||
collisions.SetCollisionNormal(worldNormal1);
|
||||
collisions.SetCollisionNormal(worldNormal1);
|
||||
collisions.SetSlidingNormal(worldNormal1);
|
||||
RecordDiagnosticHit(tree, defaultHitPolygonIndex1);
|
||||
return TransitionState.Slid;
|
||||
}
|
||||
|
||||
path.SetCollide(worldNormal1);
|
||||
path.WalkableAllowance = PhysicsGlobals.LandingZ;
|
||||
RecordDiagnosticHit(tree, defaultHitPolygonIndex1);
|
||||
return TransitionState.Collided;
|
||||
return TransitionState.Adjusted;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue