acdream/src/AcDream.Core/Physics
Erik 886333a2a9 refactor(physics): delete the redundant pre-sweep slope projection (AD-10 retired)
Stage 0's measurement (previous commit) says the projection is redundant,
so AD-10 retires by deletion rather than by narrowing.

The measurement. With the sample forced to null at BOTH fork sites, from a
clean build:

  * a remote running 30 ticks down a 31-degree walkable ramp produces a
    BIT-IDENTICAL trajectory, position for position;
  * on an 8.4-degree ramp the two differ by at most 2.8e-5 m in Z after 30
    ticks (0.03 mm) and are identical in X and Y — float ordering noise
    from projecting twice against the same plane rather than once;
  * the whole AcDream.Runtime.Tests suite is unchanged.

That is what redundancy looks like, and the arithmetic explains it. The
boundary projection and Transition.AdjustOffset are the same operation
(v -= N * dot(v, N)) against the same plane, and the composition is
idempotent: a vector already on the plane has dot(v, N) == 0, so the
sweep's own projection is a no-op on an already-projected offset and the
full-strength projection on an unprojected one. Either alone produces the
same offset. On terrain a THIRD mechanism, ValidateWalkable's push-out,
re-seats the sphere on the plane every sub-step regardless.

Deleted:
  * both RuntimeRemotePhysicsUpdater sample sites (the host and no-host
    fork branches carried the block verbatim — the AP-22 shape, a row
    naming one site where two exist);
  * the terrainNormal parameter and projection block on
    RemoteMotionCombiner.ComposeOffset;
  * the same block on ComputeOffset, which has no production callers but
    held a second copy of the divergence, so leaving it would have made
    the row's retirement false;
  * PhysicsEngine.SampleTerrainNormal, now callerless.

Removing the parameter rather than passing null is deliberate: it is what
makes a future one-site-only regression a compile error instead of a
silent half-fix.

Two tests went with it —
ComputeOffset_RootMotionFallback_SlopedTerrainNormal_ProjectsZOntoSlope and
its flat-ground twin. Both were weak on their own terms: they drove the
production-dead ComputeOffset and computed their expected values by
re-implementing the projection formula, so they could catch a wrong
MULTIPLY but never a wrong PLANE — which is exactly what the divergence
was. The surviving coverage is geometric and runs the production tick.

Three claims in the old row did not survive contact with the code and are
recorded in the retired row rather than quietly dropped: the justification
(remotes do run the sweep); the description of ComposeOffset's guard as
"interpolation-active" when the code reads `if (!interpolationOverwrote`;
and the roof clause, stale since Bug B gated the sample on OnWalkable —
a steep roof is OnWalkable == false, so the path never ran on #32's
geometry. The retail anchor is corrected too: pc:272296-272346 truncated
both the sliding-normal validity gate at the head and the entire safety
push-out block at the tail. The whole function is 0x0050a370,
pc:272271-272393.

This does not fix #32 and does not partially fix it. #32's remote half was
already closed at 204d0ae0. What deletion does improve is the case #32
never covered: a remote on a WALKABLE non-terrain surface — a bridge, a
dock, a gentle roof, a ramp inside a building — where the terrain sample
returned the plane of the ground far below and applied a wrong plane
rather than none. That surface now gets the body's own committed contact
plane, because that is the only projection left.

The planning contract this work executed is committed alongside as
docs/research/2026-08-06-ad10-contract.md.

Release build 0 errors. Complete solution suite 11,196 passed / 4 skipped
/ 0 failed against the ef976c6d baseline of 11,195 / 4 / 0 — reconciled
exactly as +3 new Runtime tests and -2 deleted Core tests.

Visual gate outstanding: G1 (the ~5 Hz staircase on rolling terrain) is
the veto criterion and runs first; then slope-descent smoothness, a
walkable non-terrain surface, the #32 roof scenario, and flat ground.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-06 09:35:22 +02:00
..
Motion refactor(physics): delete legacy PhysicsEngine.Resolve/ResolvePlacement/HasCellSurface (C5a, AP-1/AD-1) 2026-08-05 14:11:31 +02:00
AceModernCommandCatalog.cs feat(L.1b): dual MotionCommand catalog — AceModern runtime + Retail2013 conformance 2026-06-30 22:13:36 +02:00
AnimationCommandRouter.cs fix(anim): Phase L.1b route motion commands 2026-04-28 10:46:22 +02:00
AnimationHookRouter.cs feat(anim): Phase E.1 hook router + GameWindow wiring 2026-04-18 16:30:23 +02:00
AnimationSequencer.cs fix(animation): harden presentation phase handoffs 2026-07-21 10:01:25 +02:00
BSPQuery.cs fix(physics): restore retail path-6 collision response 2026-07-31 13:44:55 +02:00
BuildingPhysics.cs T6 (BR-7) C3: per-cell shadow architecture - flood registration, building channel, per-cell query; b3ce505 stopgap DELETED (closes #99) 2026-06-11 14:37:50 +02:00
CellArray.cs feat(runtime): seal dormant SetPosition evaluations 2026-08-01 11:31:58 +02:00
CellDump.cs feat(phys): A6.P3 #98 Step 2 — cell-dump probe + roundtrip test 2026-05-23 15:16:56 +02:00
CellSurface.cs refactor(physics): remove parsed collision graphs 2026-07-25 18:21:19 +02:00
CellTransit.cs refactor(physics): delete legacy PhysicsEngine.Resolve/ResolvePlacement/HasCellSurface (C5a, AP-1/AD-1) 2026-08-05 14:11:31 +02:00
CollisionExemption.cs fix(physics): #299 — port retail's mover-side IsImpenetrable exemption branch 2026-08-03 20:13:05 +02:00
CollisionPrimitives.cs feat(physics): Task 2 — true sphere collision primitive (CSphere::intersects_sphere) 2026-06-24 19:08:53 +02:00
CollisionShadowVerifier.cs perf(physics): cut production traversal to flat assets 2026-07-25 17:00:04 +02:00
CollisionTraversal.cs fix(physics): validate retail cell containment roots 2026-07-31 14:48:26 +02:00
CollisionWorldState.cs wip(physics): collision O(changed) delta-commit (O1-O3) - ON HOLD, feel-test failed 2026-08-02 20:06:59 +02:00
EncumbranceSystem.cs feat(physics): Campaign P P1 - stat-coupled movement (burden/stamina/vitae) 2026-07-30 08:18:06 +02:00
EntityCollisionFlags.cs feat(physics): C4 route 4b-3 — remote teleport + cell-less through the canonical placement 2026-08-04 16:00:10 +02:00
FlatBspQuery.cs fix(physics): restore retail path-6 collision response 2026-07-31 13:44:55 +02:00
FlatCollisionAssetBuilder.cs feat(content): bake and read flat collision assets 2026-07-25 15:22:08 +02:00
FlatCollisionAssets.cs perf(physics): cut production traversal to flat assets 2026-07-25 17:00:04 +02:00
GfxObjDump.cs feat(phys): A6.P3 #98 — GfxObj dump infrastructure (ACDREAM_DUMP_GFXOBJS) 2026-05-23 20:24:26 +02:00
IAnimationHookSink.cs feat(#188): fading-wall + sliding-door translucency; hold open past animation settle 2026-07-09 09:17:50 +02:00
IMotionCommandCatalog.cs feat(L.1b): dual MotionCommand catalog — AceModern runtime + Retail2013 conformance 2026-06-30 22:13:36 +02:00
InterpolationManager.cs fix(physics): remote bodies slide on steep faces instead of freezing (#32) 2026-08-04 10:21:16 +02:00
InterpretedMotionFunnel.cs fix(R4-V5): moveto wedge - StopCompletely's missing animation dispatch orphaned pending_motions; + the P1 autonomous store family 2026-07-03 14:15:36 +02:00
LandDefs.cs feat(physics #145): Slice 1 — Position/Frame types + LandDefs.GetBlockOffset (0x0043e630) 2026-06-21 10:30:20 +02:00
MotionCommandResolver.cs feat(L.1b): dual MotionCommand catalog — AceModern runtime + Retail2013 conformance 2026-06-30 22:13:36 +02:00
MotionInterpreter.cs fix #270 closeout: strip investigation probes; close the issue 2026-07-31 07:26:57 +02:00
MovementSystem.cs fix #266: retail run-rate 800 branch is exact-equality sentinel, not a cap 2026-07-30 19:22:41 +02:00
ObjectRangeMath.cs fix(items): use retail cylinder range for loot windows 2026-07-17 20:32:34 +02:00
PhysicsBody.cs refactor(physics): delete legacy PhysicsEngine.Resolve/ResolvePlacement/HasCellSurface (C5a, AP-1/AD-1) 2026-08-05 14:11:31 +02:00
PhysicsDataCache.cs wip(physics): collision O(changed) delta-commit (O1-O3) - ON HOLD, feel-test failed 2026-08-02 20:06:59 +02:00
PhysicsDiagnostics.cs fix(physics): C4 route 3 — portal placement authority (local player) 2026-08-05 03:57:37 +02:00
PhysicsEngine.cs refactor(physics): delete the redundant pre-sweep slope projection (AD-10 retired) 2026-08-06 09:35:22 +02:00
PhysicsObjUpdate.cs feat(runtime): commit dormant SetPosition activation 2026-08-01 14:25:02 +02:00
PhysicsResolveCapture.cs test: fix PhysicsResolveCapture/PhysicsDiagnostics static-leak isolation 2026-06-02 15:20:24 +02:00
PhysicsSetPosition.cs feat(runtime): seal dormant SetPosition evaluations 2026-08-01 11:31:58 +02:00
PhysicsTimestampGate.cs feat(runtime): own initial create residence transaction 2026-08-01 19:35:08 +02:00
PlayerWeenie.cs fix #266: retail run-rate 800 branch is exact-equality sentinel, not a cap 2026-07-30 19:22:41 +02:00
PortalInfo.cs feat(physics): Phase 2 — wire CellBSP + Portals into CellPhysics 2026-05-19 16:52:20 +02:00
PortalPlane.cs fix(core): Phase B.3 — add centroid + radius bounds to PortalPlane crossing test 2026-04-12 19:08:46 +02:00
Position.cs refactor(physics #145): Slice 1 — rename Frame->CellFrame to avoid DatReaderWriter.Types.Frame collision 2026-06-21 10:34:36 +02:00
PositionFrameValidation.cs feat(net): port retail physics spawn and event timestamps 2026-07-14 00:22:17 +02:00
ProjectilePhysicsStepper.cs feat(physics): port retail complete object frame pipeline 2026-07-20 09:10:31 +02:00
RawMotionState.cs feat(R3-W1): retail state completion — action FIFOs, MovementParameters, MotionNode, WeenieError renumber (closes J2, J16-codes) 2026-07-02 22:12:33 +02:00
RemoteMotionCombiner.cs refactor(physics): delete the redundant pre-sweep slope projection (AD-10 retired) 2026-08-06 09:35:22 +02:00
RemoteWeenie.cs fix(R4-V5): #160 remote run movetos in slow motion - remote interps had no weenie, so retail's run-rate chain never reached my_run_rate 2026-07-03 16:18:40 +02:00
ResolveResult.cs refactor(physics): delete legacy PhysicsEngine.Resolve/ResolvePlacement/HasCellSurface (C5a, AP-1/AD-1) 2026-08-05 14:11:31 +02:00
Retail2013CommandCatalog.cs feat(L.1b): dual MotionCommand catalog — AceModern runtime + Retail2013 conformance 2026-06-30 22:13:36 +02:00
RetailFrameMath.cs feat(physics): port retail projectile integration 2026-07-14 11:43:11 +02:00
RetailObjectActivityGate.cs feat(physics): port retail complete object frame pipeline 2026-07-20 09:10:31 +02:00
RetailObjectManagerTail.cs feat(physics): port retail complete object frame pipeline 2026-07-20 09:10:31 +02:00
RetailObjectQuantumClock.cs feat(physics): port retail complete object frame pipeline 2026-07-20 09:10:31 +02:00
RetailPhysicsStateTransition.cs feat(vfx): port retail hidden and teleport presentation 2026-07-14 14:59:48 +02:00
ServerControlledLocomotion.cs fix(combat): persist death and retarget on kill 2026-07-12 09:19:38 +02:00
ShadowEntrySnapshot.cs perf(physics): pool collision cell snapshots 2026-07-23 06:12:34 +02:00
ShadowObjectRegistry.cs fix(physics): #297 — keep the PWD bitfield live so PK status reaches the client 2026-08-03 20:59:01 +02:00
ShadowShape.cs feat(phys): add ShadowShape record (no callers yet) 2026-05-24 15:07:40 +02:00
ShadowShapeBuilder.cs fix(physics): delete the invented Setup-radius collision cylinder (AP-22) 2026-08-06 08:27:26 +02:00
SpawnPlacementSettler.cs fix(physics): adopt the settle's resolved cell across an indoor seam (#276 remainder) 2026-08-06 06:37:46 +02:00
TerrainSurface.cs fix(physics): AP-10 - restore retail's 0.1m dry-corner water sink-in; wire WATER_CONTACT_TS 2026-07-30 10:52:39 +02:00
TransitionScratchArena.cs perf(physics): reuse reset-complete transition scratch 2026-07-25 14:37:02 +02:00
TransitionTypes.cs feat(runtime): seal dormant SetPosition evaluations 2026-08-01 11:31:58 +02:00
WalkMissDiagnostic.cs feat(physics): WalkMissDiagnostic aggregator for ISSUES #83 probe spike 2026-05-20 10:31:39 +02:00
WeenieError.cs feat(core): adopt retail's full WeenieError code table 2026-07-29 07:33:27 +02:00