Bazaar developer reference

CvGame::countCivPlayersAlive() const

Defined in
CvGame.cpp, line 3801
Class
CvGame
Hook name
CivHooks::CvGame_countCivPlayersAlive

Hooks

static bool BeforeCvGame_countCivPlayersAlive(const CvGame* self, int& result);static void AfterCvGame_countCivPlayersAlive(const CvGame* self, int& result);static int ReplaceCvGame_countCivPlayersAlive(int (*original)(const CvGame*), const CvGame* self);CivRegisterBefore<CivHooks::CvGame_countCivPlayersAlive>(host, &BeforeCvGame_countCivPlayersAlive);CivRegisterAfter<CivHooks::CvGame_countCivPlayersAlive>(host, &AfterCvGame_countCivPlayersAlive);CivRegisterReplace<CivHooks::CvGame_countCivPlayersAlive>(host, &ReplaceCvGame_countCivPlayersAlive);

Code

3801int CvGame::countCivPlayersAlive() const3802{3803	int iCount;3804	int iI;38053806	iCount = 0;38073808	for(iI = 0; iI < MAX_CIV_PLAYERS; iI++)3809	{3810		if(GET_PLAYER((PlayerTypes)iI).isAlive())3811		{3812			iCount++;3813		}3814	}38153816	return iCount;3817}

Calls

Called by