acdream/src/AcDream.App/Streaming
Erik 7b9a66c9ea feat(lighting): Phase G.2 — Setup.Lights + SetLightHook wiring
Register dat-defined LightInfos as runtime LightSources when entities
stream in. Every Setup (0x02xxxxxx) with a non-empty Lights dictionary
gets its per-part lights pulled via LightInfoLoader, which converts
the local Frame + ColorARGB + Intensity + Falloff + ConeAngle fields
into world-space LightSource records owned by the entity id.

Wire the LightingHookSink into the animation-hook router so retail's
SetLightHook animations (ignite-torch, extinguish-lamp) flip the
matching LightSource.IsLit latches. One hook may own multiple lights
(lamp-posts with two LightInfo entries) — the sink maintains an
owner-indexed map so all get toggled together.

Unregister on landblock unload: the streaming controller's
removeTerrain callback grabs the loaded landblock's entity list (new
GpuWorldState.TryGetLandblock helper) and drops every owner from the
sink before the entities disappear — otherwise walking across
landblocks accumulates stale LightSources.

9 new tests (LightingHookSink routing + LightInfoLoader conversion).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 10:46:49 +02:00
..
GpuWorldState.cs feat(lighting): Phase G.2 — Setup.Lights + SetLightHook wiring 2026-04-19 10:46:49 +02:00
LandblockStreamer.cs fix(app): Phase A.1 — make LandblockStreamer synchronous (DatCollection isn't thread-safe) 2026-04-11 22:56:19 +02:00
LandblockStreamJob.cs fix(app): Phase A.1 — LandblockStreamer lifecycle + threading hardening 2026-04-11 22:20:41 +02:00
StreamingController.cs feat(app): Phase B.3 — wire PhysicsEngine into streaming pipeline 2026-04-12 09:58:07 +02:00
StreamingRegion.cs fix(app): Phase A.1 — encode landblock IDs with 0xFFFF terminator, not 0xFFFE 2026-04-11 22:59:21 +02:00