Bazaar developer reference

CvGame::allUnitAIProcessed() const

Defined in
CvGame.cpp, line 11316
Class
CvGame
Hook name
CivHooks::CvGame_allUnitAIProcessed

Hooks

static bool BeforeCvGame_allUnitAIProcessed(const CvGame* self, bool& result);static void AfterCvGame_allUnitAIProcessed(const CvGame* self, bool& result);static bool ReplaceCvGame_allUnitAIProcessed(bool (*original)(const CvGame*), const CvGame* self);CivRegisterBefore<CivHooks::CvGame_allUnitAIProcessed>(host, &BeforeCvGame_allUnitAIProcessed);CivRegisterAfter<CivHooks::CvGame_allUnitAIProcessed>(host, &AfterCvGame_allUnitAIProcessed);CivRegisterReplace<CivHooks::CvGame_allUnitAIProcessed>(host, &ReplaceCvGame_allUnitAIProcessed);

Code

11316bool CvGame::allUnitAIProcessed() const11317{11318	int i = 0;11319	for(i = 0; i < MAX_PLAYERS; i++)11320	{11321		const CvPlayer& player = GET_PLAYER(static_cast<PlayerTypes>(i));11322		if(player.isTurnActive() && player.hasUnitsThatNeedAIUpdate())11323			return false;11324	}11325	return true;11326}

Calls

Called by