Reconcile radio-delivered body and status casualties by original roster identity

This commit is contained in:
2026-09-20 03:09:16 +02:00
parent a2aab17171
commit 9b6596eb3e
44 changed files with 6042 additions and 86 deletions
+5 -2
View File
@@ -296,7 +296,7 @@ class ERR_HQ : ERR_CommandService
if (!record || !record.Physical || record.Eliminated) return;
unit.ForceSourceId = record.SourceId;
if (!unit.StatusSampler.Bound()) unit.StatusSampler.Bind(unit.Group, record.SourceId, record.InitialStrength, m_Mode.EnemyFaction());
m_Bodies.RegisterGroup(unit.Group);
if (unit.StatusSampler.Bound()) m_Bodies.RegisterGroup(unit.Group, unit.StatusSampler);
}
override void RegisterGroup(SCR_AIGroup group)
{
@@ -541,9 +541,12 @@ class ERR_HQ : ERR_CommandService
protected void Accept(ERR_HQReport report, float now)
{
if (!report || !ERR_MissionRules.ContactFresh(report.ObservedAt, now)) return;
// Delivered scalar body evidence survives native corpse cleanup during radio transit.
// Memory still applies its own entity-identity rules; casualty accounting needs no live target.
if (ERR_HQMemoryRules.Kind(report) == ERR_HQMemoryKind.BODY && m_Watch.IngestBody(report, now))
m_Bodies.ConfirmDelivered(report.Target);
if (!m_Memory.Ingest(report, now)) return;
if (ERR_HQMemoryRules.Kind(report) == ERR_HQMemoryKind.SIGHTING) m_Coverage.Forget(report.Position);
if (ERR_HQMemoryRules.Kind(report) == ERR_HQMemoryKind.BODY) m_Bodies.ConfirmDelivered(report.Target);
m_Journal.Write("BELIEF", string.Format("delivered report M%1 retained; tracks=%2", report.MessageId, m_Memory.Count()), report.MessageId);
// A reported corpse or distress call can justify investigation, never fire.
if (ERR_HQMemoryRules.Kind(report) != ERR_HQMemoryKind.SIGHTING) return;