Bazaar developer reference

CvGame::countCivPlayersEverAlive() const

Defined in
CvGame.cpp, line 3821
Class
CvGame
Hook name
CivHooks::CvGame_countCivPlayersEverAlive

Hooks

static bool BeforeCvGame_countCivPlayersEverAlive(const CvGame* self, int& result);static void AfterCvGame_countCivPlayersEverAlive(const CvGame* self, int& result);static int ReplaceCvGame_countCivPlayersEverAlive(int (*original)(const CvGame*), const CvGame* self);CivRegisterBefore<CivHooks::CvGame_countCivPlayersEverAlive>(host, &BeforeCvGame_countCivPlayersEverAlive);CivRegisterAfter<CivHooks::CvGame_countCivPlayersEverAlive>(host, &AfterCvGame_countCivPlayersEverAlive);CivRegisterReplace<CivHooks::CvGame_countCivPlayersEverAlive>(host, &ReplaceCvGame_countCivPlayersEverAlive);

Code

3821int CvGame::countCivPlayersEverAlive() const3822{3823	int iCount;3824	int iI;38253826	iCount = 0;38273828	for(iI = 0; iI < MAX_CIV_PLAYERS; iI++)3829	{3830		if(GET_PLAYER((PlayerTypes)iI).isEverAlive())3831		{3832			iCount++;3833		}3834	}38353836	return iCount;3837}

Calls

Called by