Bazaar developer reference

CvPlayer::GetScoreFromPopulation() const

Defined in
CvPlayer.cpp, line 5547
Class
CvPlayer
Hook name
CivHooks::CvPlayer_GetScoreFromPopulation

Hooks

static bool BeforeCvPlayer_GetScoreFromPopulation(const CvPlayer* self, int& result);static void AfterCvPlayer_GetScoreFromPopulation(const CvPlayer* self, int& result);static int ReplaceCvPlayer_GetScoreFromPopulation(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_GetScoreFromPopulation>(host, &BeforeCvPlayer_GetScoreFromPopulation);CivRegisterAfter<CivHooks::CvPlayer_GetScoreFromPopulation>(host, &AfterCvPlayer_GetScoreFromPopulation);CivRegisterReplace<CivHooks::CvPlayer_GetScoreFromPopulation>(host, &ReplaceCvPlayer_GetScoreFromPopulation);

Code

5546// Score from Population: 6 per pop (with mod for map size)5547int CvPlayer::GetScoreFromPopulation() const5548{5549	int iScore = getTotalPopulation() * /*4*/ GC.getSCORE_POPULATION_MULTIPLIER();55505551	iScore *= GC.getGame().GetMapScoreMod();5552	iScore /= 100;55535554	return iScore;5555}

Calls

Called by