Bazaar developer reference

CvGame::countTotalNukeUnits()

Defined in
CvGame.cpp, line 4053
Class
CvGame
Hook name
CivHooks::CvGame_countTotalNukeUnits

Hooks

static bool BeforeCvGame_countTotalNukeUnits(CvGame* self, int& result);static void AfterCvGame_countTotalNukeUnits(CvGame* self, int& result);static int ReplaceCvGame_countTotalNukeUnits(int (*original)(CvGame*), CvGame* self);CivRegisterBefore<CivHooks::CvGame_countTotalNukeUnits>(host, &BeforeCvGame_countTotalNukeUnits);CivRegisterAfter<CivHooks::CvGame_countTotalNukeUnits>(host, &AfterCvGame_countTotalNukeUnits);CivRegisterReplace<CivHooks::CvGame_countTotalNukeUnits>(host, &ReplaceCvGame_countTotalNukeUnits);

Code

4053int CvGame::countTotalNukeUnits()4054{4055	int iCount;4056	int iI;40574058	iCount = 0;40594060	for(iI = 0; iI < MAX_CIV_PLAYERS; iI++)4061	{4062		if(GET_PLAYER((PlayerTypes)iI).isAlive())4063		{4064			iCount += GET_PLAYER((PlayerTypes)iI).getNumNukeUnits();4065		}4066	}40674068	return iCount;4069}

Calls

Called by