Subversion Repositories RAND

Compare Revisions

Ignore whitespace Rev 1037 → Rev 1038

/Sources/CvGame.cpp
806,7 → 806,7
 
m_iElapsedGameTurns = 0;
m_iStartTurn = 0;
m_iStartYear = 0;
m_iStartYear = GC.getDefineINT("START_YEAR");
m_iEstimateEndTurn = 0;
m_iDateTurn = -500;
m_iTurnSlice = 0;
7140,7 → 7140,7
EraTypes eEndEra = (EraTypes)(isOption(GAMEOPTION_NO_FUTURE) ? GC.getInfoTypeForString("ERA_MODERN") : GC.getNumEraInfos() - 1);
int iEraCount = eEndEra - eStartEra;
//Assuming we divide turns evenly per era
float fExpectedEra = (float)getElapsedGameTurns() / (float)(iEstimateEndTurn / iEraCount);
float fExpectedEra = (float)((getElapsedGameTurns() / (float)(iEstimateEndTurn / iEraCount)) + eStartEra);
 
float fAverageEra = 0;
int iPlayers = 0;
13264,10 → 13264,23
}
else
{
if (GET_PLAYER((PlayerTypes)iJ).getCurrentEra() > 1)
if (getStartEra() == 0) //45deg: check on StartEra for Advanced Starts
{
if (GET_PLAYER((PlayerTypes)iJ).getNumCities() > 1)
if (GET_PLAYER((PlayerTypes)iJ).getCurrentEra() > 1)
{
if (GET_PLAYER((PlayerTypes)iJ).getNumCities() > 1)
{
iAliveCount++;
int iScore = getPlayerScore((PlayerTypes)iJ);
iTotalScore += iScore;
if (iScore > iBestScore)
{
iBestScore = iScore;
}
}
}
else
{
iAliveCount++;
int iScore = getPlayerScore((PlayerTypes)iJ);
iTotalScore += iScore;
13275,7 → 13288,7
{
iBestScore = iScore;
}
}
}
}
else
{
13286,7 → 13299,7
{
iBestScore = iScore;
}
}
}
}
}
}
/Sources/CvTeam.cpp
3775,7 → 3775,11
{
fEstimateEndTurn += GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getGameTurnInfo(iI).iNumGameTurnsPerIncrement;
}
fEstimateEndTurn -= GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getGoldenAgePercent() / 20; // leave 10 turns at the end of the game for Future Techs (blitz gamespeed), scaled for gamespeed
fEstimateEndTurn *= (100- (GC.getEraInfo(GC.getGameINLINE().getStartEra()).getStartPercent()));
fEstimateEndTurn /= 100;
//fEstimateEndTurn -= GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getGoldenAgePercent() / 20; // leave 5 turns at the end of the game for Future Techs (blitz gamespeed), scaled for gamespeed
EraTypes eStartEra = (EraTypes)GC.getGame().getStartEra();
EraTypes eEndEra = (EraTypes)((GC.getGameINLINE().isOption(GAMEOPTION_NO_FUTURE)) ? GC.getInfoTypeForString("ERA_MODERN") : GC.getNumEraInfos() - 1);
int iEraCount = (int)eEndEra - (int)eStartEra;
3791,7 → 3795,7
}
}
//Assuming we divide turns evenly per era
float fExpectedEra = GC.getGameINLINE().getElapsedGameTurns() / (fEstimateEndTurn / iEraCount);
float fExpectedEra = (GC.getGameINLINE().getElapsedGameTurns() / (fEstimateEndTurn / iEraCount)) + eStartEra;
float fPlayerEra = (float)GET_PLAYER(getLeaderID()).getCurrentEra();
for (int iI = 0; iI < GC.getNumTechInfos(); iI++) // 45deg: assuming we have the same number of techs per era; it's not true but it's a good approximation for our puroposes
{