Four new foreach blocks in GpuWorldState wire EntityScriptActivator into the dat-hydration spawn/despawn paths: - AddLandblock: fires OnCreate for each entity with ServerGuid==0 (live entities filtered out — they got OnCreate at AppendLiveEntity and would double-fire on pending-bucket merges). - AddEntitiesToExistingLandblock: fires OnCreate for each entity in the promoted batch (all dat-hydrated by construction). - RemoveLandblock: fires OnRemove(entity.Id) for each ServerGuid==0 entity before the loaded record is dropped. - RemoveEntitiesFromLandblock: fires OnRemove for the demote-tier entities about to be cleared (Near→Far demotion). 5 new integration tests cover the four fire-sites + the no-double-fire invariant on pending-bucket merges. Pattern matches existing GpuWorldStateTests (stub LandBlock heightmap + WorldEntity factory). Closes #56 end-to-end. Slice A (per-part transforms in Tasks 1-3) + Slice B (dat-hydrated entity DefaultScript firing, this task) both ready for visual verification at Holtburg portal + Inn fireplace + cottage chimney + spell cast. Note: 8 pre-existing failures in Physics/Input/MotionInterpreter test families are unrelated to this work (verified by re-running with this task's changes stashed). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| GpuWorldStateActivatorTests.cs | ||
| GpuWorldStateTests.cs | ||
| GpuWorldStateTwoTierTests.cs | ||
| LandblockStreamerTests.cs | ||
| StreamingControllerTests.cs | ||
| StreamingControllerTwoTierTests.cs | ||
| StreamingRegionTests.cs | ||
| StreamingRegionTwoTierTests.cs | ||