feat(render): S2 chunk 2 - render statics borrow the registry's retail cell array
WalkProductionWorldData no longer floods; its indoor and outdoor static sweeps read ShadowObjectRegistry.TryGetRetailCellArray (retail's calc_cross_cells_static @0x00515160 -> AddPartsShadow @0x00517e40 CELLARRAY, computed once at registration). The App-owned render flood (ResolveStaticRenderCells, its fingerprint cache, the primitive-Setup special case) and Core's ComputeStaticRenderCells are deleted. The one remaining fallback, an entity the physics publisher has not registered yet while the projection journal already published it, buckets to the authored parent cell and is counted per frame (UnregisteredStaticRenderFallbackCount) for chunk 5 to judge on the connected route. The Facility stair pin now registers at the projection's own entity id (the old pure-function test never carried identity) and reads the retail array; the installed-DAT comparator compares retail against collision. Gates (run in the implementer's isolated worktree at identical content): Release build 0/0; Core Physics 2,202/2,202; App hermetic 6,760/6,760 (the two added WalkProductionWorldData tests); installed-DAT walk/flood/stair family 24/24; Runtime 1,884/1,884. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
2b40c0bb38
commit
707d2803a4
10 changed files with 392 additions and 227 deletions
|
|
@ -400,47 +400,6 @@ public sealed class ShadowObjectRegistry
|
|||
private PhysicsDataCache? _fallback;
|
||||
private PhysicsDataCache FloodCache => DataCache ?? _fallbackCache;
|
||||
|
||||
/// <summary>
|
||||
/// Computes retail's static PartArray render-cell membership without
|
||||
/// publishing collision rows. Static visual parts and collision shapes
|
||||
/// share the same <c>find_bbox_cell_list</c> portal walk, but retail keeps
|
||||
/// them in separate cell lists (<c>shadow_part_list</c> versus
|
||||
/// <c>shadow_object_list</c>). Decorative meshes therefore need this path
|
||||
/// even when <see cref="GetOwnerCells"/> is empty.
|
||||
///
|
||||
/// <para>
|
||||
/// Campaign OVERHAUL S2 chunk 1: <c>RecomputeRetailCellArray</c>'s bbox
|
||||
/// route is this same primitive, called from the entity's own
|
||||
/// registration transaction instead of a per-frame consumer. This
|
||||
/// method is that recomputation's predecessor; S2 chunk 2 deletes it
|
||||
/// once consumers cut over to <see cref="TryGetRetailCellArray"/>.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public IReadOnlyList<uint> ComputeStaticRenderCells(
|
||||
uint seedCellId,
|
||||
Vector3 entityWorldPosition,
|
||||
Quaternion entityWorldRotation,
|
||||
IReadOnlyList<ShadowShape> visualParts)
|
||||
{
|
||||
if (seedCellId == 0u || visualParts.Count == 0)
|
||||
return Array.Empty<uint>();
|
||||
|
||||
List<ShadowPartBox> boxes = BuildFloodPartBoxes(
|
||||
entityWorldPosition,
|
||||
entityWorldRotation,
|
||||
visualParts);
|
||||
List<DatReaderWriter.Types.Sphere> spheres = BuildBspPartSpheres(
|
||||
entityWorldPosition,
|
||||
entityWorldRotation,
|
||||
visualParts);
|
||||
return CellTransit.BuildShadowCellSetFromParts(
|
||||
FloodCache,
|
||||
seedCellId,
|
||||
boxes,
|
||||
spheres,
|
||||
isStatic: true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retail's exact <c>CObjCell::find_cell_list</c>/<c>find_bbox_cell_list</c>
|
||||
/// CELLARRAY (Contract A, re-verified 2026-09-01 through the live Ghidra
|
||||
|
|
@ -473,8 +432,7 @@ public sealed class ShadowObjectRegistry
|
|||
/// <item>otherwise the bbox route (<c>CPhysicsObj::find_bbox_cell_list</c>
|
||||
/// 0x00510fc0 via <see cref="CellTransit.BuildShadowCellSetFromParts"/>) —
|
||||
/// every other case, including a BSP-bearing object (state bit set) and a
|
||||
/// part array with no authored CylSpheres at all. This is the exact
|
||||
/// primitive <see cref="ComputeStaticRenderCells"/> already uses.</item>
|
||||
/// part array with no authored CylSpheres at all.</item>
|
||||
/// </list>
|
||||
/// </summary>
|
||||
private void RecomputeRetailCellArray(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue