CalculateSpawnLevels() { for (int i = 0; i < m_Population.Count; i++) { CGenome genome = m_Population[i]; float toSpawn = 0; if (m_dAvFitAdj > 0) { toSpawn = genome.GetAdjustedFitness() / m_dAvFitAdj; } genome.SetAmountToSpawn(toSpawn); } for (int i = 0; i < m_vecSpecies.Count; i++) { CSpecies species = m_vecSpecies[i]; species.CalculateSpawnAmount(); } }