131 probe: print matched emitter owner ids + the setup-dump diagnostic (portal identification capture)

unattached=0 in the last capture refuted the unattached hypothesis (the fix-1 pass is vacuous); the swirl outdoors rides a MATCHED attached emitter, so its owner is an OutdoorStatic keyed by a synthetic id. The matched-ids dump on an inside-vs-outside capture pair names the owner: the id that flips. Issue131SetupProbeTests dumps the outstage candidate setups from the dat.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-12 19:48:53 +02:00
parent 87afbc0a42
commit a07279dfd1
2 changed files with 81 additions and 2 deletions

View file

@ -5097,6 +5097,7 @@ public sealed class GameWindow : IDisposable
// #131 [outstage-pt] probe state (throwaway — strip when #131 closes).
private string? _lastOutStagePtSig;
private readonly HashSet<uint> _outStageUnmatchedScratch = new();
private readonly HashSet<uint> _outStageMatchedScratch = new();
private static System.Numerics.Vector3 SkyPesAnchor(
AcDream.Core.World.SkyObjectData obj,
@ -9742,19 +9743,28 @@ public sealed class GameWindow : IDisposable
{
int matched = 0, attached = 0, unattached = 0;
_outStageUnmatchedScratch.Clear();
_outStageMatchedScratch.Clear();
foreach (var (emitter, _) in _particleSystem.EnumerateLive())
{
if (emitter.AttachedObjectId == 0) { unattached++; continue; }
attached++;
if (_outdoorSceneParticleEntityIds.Contains(emitter.AttachedObjectId)) matched++;
if (_outdoorSceneParticleEntityIds.Contains(emitter.AttachedObjectId))
{
matched++;
if (_outStageMatchedScratch.Count < 48)
_outStageMatchedScratch.Add(emitter.AttachedObjectId);
}
else if (_outStageUnmatchedScratch.Count < 12)
_outStageUnmatchedScratch.Add(emitter.AttachedObjectId);
}
var unm = new System.Text.StringBuilder(96);
foreach (uint id in _outStageUnmatchedScratch)
unm.Append(System.FormattableString.Invariant($" 0x{id:X8}"));
var mat = new System.Text.StringBuilder(192);
foreach (uint id in _outStageMatchedScratch)
mat.Append(System.FormattableString.Invariant($" 0x{id:X8}"));
string ptSig = System.FormattableString.Invariant(
$"ids={_outdoorSceneParticleEntityIds.Count} attachedEmitters={attached} matched={matched} unattached={unattached} unmatchedIds=[{unm}]");
$"ids={_outdoorSceneParticleEntityIds.Count} attachedEmitters={attached} matched={matched} unattached={unattached} matchedIds=[{mat}] unmatchedIds=[{unm}]");
if (ptSig != _lastOutStagePtSig)
{
_lastOutStagePtSig = ptSig;