acdream/src/AcDream.Core/Meshing
Erik 9ebb206086 fix(#79/#93): mesh-empty hydration gate was dropping light-only fixtures
Root-caused via dat-truth inspection, not inference: the A7.L1 visible-
cell scoping fix (previous commit) had zero visual effect because the
Town Network fountain room (cell 0x00070144) registers ZERO lights of
its own — confirmed directly against the dat, not assumed. The room's
one dat-authored fixture, Setup 0x02000365 (a ceiling light 5m above the
fountain, warm color, intensity 100), has a single visual part that is a
#136-class runtime-hidden marker. Flattened mesh ref count: 0. GameWindow
's per-stab hydration loop treated meshRefs.Count==0 as "doesn't exist"
and dropped the whole entity before the Setup's Lights were ever read —
so a mesh-less "light attach point" fixture, a normal AC dat authoring
pattern, could never register. Retail's light registration (add_light,
CEnvCell::UnPack) is architecturally independent of a fixture's own mesh
visibility.

Fix: track the stab's Setup.Lights.Count alongside meshRefs during
hydration; keep the entity (with empty MeshRefs — nothing to draw, still
something to light) whenever either is nonzero. Extracted the decision
into EntityHydrationRules.ShouldKeepEntity (pure, unit-tested) since
GameWindow's hydration loop isn't independently testable. Confirmed no
downstream consumer assumes MeshRefs.Count >= 1 (WbDrawDispatcher already
guards on it before any indexing).

Core 2666+2skip / App 741+2skip / UI 425 / Net 385 green. Apparatus:
Issue93TownNetworkFountainRoomLightInspectionTests (dat-truth dump,
reusable for other rooms in this class).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 11:11:16 +02:00
..
CellMesh.cs feat(net): Phase 6.6 — parse UpdateMotion (0xF74C) into MotionUpdated event 2026-04-11 20:33:26 +02:00
EntityHydrationRules.cs fix(#79/#93): mesh-empty hydration gate was dropping light-only fixtures 2026-07-09 11:11:16 +02:00
GfxObjBounds.cs #119: entity bounds from dat vertex data - works for every case, not just multi-part 2026-06-11 22:39:05 +02:00
GfxObjDegradeResolver.cs fix(render): hide editor-only placement markers in dungeons — port retail's degrade-to-nothing (#136) 2026-06-14 19:03:08 +02:00
GfxObjMesh.cs feat(vfx): Phase C.1 — PES particle renderer + post-review fixes 2026-04-28 22:47:11 +02:00
GfxObjSubMesh.cs feat(vfx): Phase C.1 — PES particle renderer + post-review fixes 2026-04-28 22:47:11 +02:00
MotionResolver.cs fix(core+app): Phase 6.8 — keep NPCs animated when post-spawn motion update is unmappable 2026-04-12 00:05:23 +02:00
SetupMesh.cs fix(core): ACME cross-check fixes — normals, placement, scenery 2026-04-12 22:52:08 +02:00
SetupPartTransforms.cs feat(vfx #C.1.5b): SetupPartTransforms helper for per-part anchor transforms 2026-05-11 23:54:33 +02:00
TranslucencyKind.cs feat(vfx): Phase C.1 — PES particle renderer + post-review fixes 2026-04-28 22:47:11 +02:00