Bazaar developer reference

CvGame::countHumanPlayersEverAlive() const

Defined in
CvGame.cpp, line 3904
Class
CvGame
Hook name
CivHooks::CvGame_countHumanPlayersEverAlive

Hooks

static bool BeforeCvGame_countHumanPlayersEverAlive(const CvGame* self, int& result);static void AfterCvGame_countHumanPlayersEverAlive(const CvGame* self, int& result);static int ReplaceCvGame_countHumanPlayersEverAlive(int (*original)(const CvGame*), const CvGame* self);CivRegisterBefore<CivHooks::CvGame_countHumanPlayersEverAlive>(host, &BeforeCvGame_countHumanPlayersEverAlive);CivRegisterAfter<CivHooks::CvGame_countHumanPlayersEverAlive>(host, &AfterCvGame_countHumanPlayersEverAlive);CivRegisterReplace<CivHooks::CvGame_countHumanPlayersEverAlive>(host, &ReplaceCvGame_countHumanPlayersEverAlive);

Code

3904int CvGame::countHumanPlayersEverAlive() const3905{3906	int iCount;3907	int iI;39083909	iCount = 0;39103911	for(iI = 0; iI < MAX_CIV_PLAYERS; iI++)3912	{3913		if(GET_PLAYER((PlayerTypes)iI).isEverAlive())3914		{3915			if(GET_PLAYER((PlayerTypes)iI).isHuman())3916			{3917				iCount++;3918			}3919		}3920	}39213922	return iCount;3923}

Calls

Called by