Deliver local sighting handoffs and preserve unsubmitted resupply attempts

This commit is contained in:
2026-09-20 10:18:18 +02:00
parent d8ec0de765
commit 81c0f060fd
48 changed files with 6994 additions and 30 deletions
@@ -174,7 +174,9 @@ class ERR_InfantryResupply
m_MoveWaypoint = AIWaypoint.Cast(ERR_Actors.Spawn(ERR_Resources.MoveWaypoint(), ERR_Actors.Ground(m_Rendezvous)));
m_HoldWaypoint = AIWaypoint.Cast(ERR_Actors.Spawn(ERR_Resources.DefendWaypoint(), ERR_Actors.Ground(m_Rendezvous)));
if (!m_MoveWaypoint || !m_HoldWaypoint) return false;
m_MoveWaypoint.SetCompletionRadius(2); m_HoldWaypoint.SetCompletionRadius(3);
// The reported rendezvous is 3 m from the donor report. A 2 m move
// radius allowed arrival 5 m away, beyond the transfer's physical reach.
m_MoveWaypoint.SetCompletionRadius(0.5); m_HoldWaypoint.SetCompletionRadius(0.5);
m_Recipient.Group.AddWaypointAt(m_HoldWaypoint, 0); m_Recipient.Group.AddWaypointAt(m_MoveWaypoint, 0);
m_Recipient.Group.ActivateAI(); return true;
}
@@ -215,7 +217,13 @@ class ERR_InfantryResupply
if (!magazine || m_Spent.Contains(magazine) || !Contains(m_Truck.Entity, magazine) || !ERR_InfantryAmmoTransfer.Compatible(actor, magazine)) continue;
m_Spent.Insert(magazine); m_Receiving = actor;
m_Move = new ERR_InfantryAmmoTransfer(m_Mode, m_Truck.Entity, m_Truck.Group, actor, m_Recipient.Group, magazine);
m_Move.Tick(now); return;
m_Move.Tick(now);
if (m_Move.Submitted()) return;
// No native operation exists yet: approach geometry, stopped state or
// capacity may improve while the same bounded rendezvous remains valid.
// Keep every submitted identity spent, including a synchronous rejection.
m_Spent.RemoveItem(magazine); m_Move = null; m_Receiving = null;
break; // At most one unsubmitted preflight per member on this slow tick.
}
}
}