コード例 #1
0
void
CampaignPlanStrategic::ExecFrame()
{
    if (campaign && campaign->IsActive()) {
        if (Campaign::Stardate() - exec_time < 300)
        return;

        ListIter<CombatZone> zone = campaign->GetZones();
        while (++zone)
        zone->Clear();

        ListIter<Combatant>  iter = campaign->GetCombatants();
        while (++iter) {
            Combatant*     c     = iter.value();
            CombatGroup*   force = c->GetForce();

            force->CalcValue();

            PlaceGroup(force);
            ScoreCombatant(c);
            ScoreNeeds(c);

            force->ClearUnlockedZones();
            AssignZones(c);
            ResolveZoneMovement(force);
        }

        exec_time = Campaign::Stardate();
    }
}
コード例 #2
0
void
CombatGroup::ClearUnlockedZones()
{
	if (!zone_lock)
	assigned_zone = 0;

	ListIter<CombatGroup> iter = components;
	while (++iter) {
		CombatGroup* g = iter.value();
		g->ClearUnlockedZones();
	}
}