fix but where balancing matches did not finish until enemy hq was destroyed

This commit is contained in:
2026-07-04 09:29:13 +02:00
parent df9f0d5ccd
commit 9ddd622870

View File

@@ -433,10 +433,13 @@ void ArenaSimulation::tickDeaths()
}); });
m_admin.forEach<StationBodyComponent, FactionComponent>( m_admin.forEach<StationBodyComponent, FactionComponent>(
[&team1HasUnits, &team2HasUnits](entt::entity /*e*/, [this, &team1HasUnits, &team2HasUnits](entt::entity e,
const StationBodyComponent& /*sb*/, const StationBodyComponent& /*sb*/,
const FactionComponent& f) const FactionComponent& f)
{ {
// The HQ carries a StationBodyComponent but is not a defence station;
// its destruction is a separate end condition (REQ-BAL-SIM-END).
if (m_admin.hasAll<HqProxyComponent>(e)) { return; }
if (f.isEnemy) { team2HasUnits = true; } if (f.isEnemy) { team2HasUnits = true; }
else { team1HasUnits = true; } else { team1HasUnits = true; }
}); });