fix bug where balancing matches did not finish until enemy hq was destroyed
This commit is contained in:
@@ -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; }
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user