Bazaar developer reference

CvPlayer::hasUnitsThatNeedAIUpdate() const

Defined in
CvPlayer.cpp, line 27854
Class
CvPlayer
Hook name
CivHooks::CvPlayer_hasUnitsThatNeedAIUpdate

Hooks

static bool BeforeCvPlayer_hasUnitsThatNeedAIUpdate(const CvPlayer* self, bool& result);static void AfterCvPlayer_hasUnitsThatNeedAIUpdate(const CvPlayer* self, bool& result);static bool ReplaceCvPlayer_hasUnitsThatNeedAIUpdate(bool (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_hasUnitsThatNeedAIUpdate>(host, &BeforeCvPlayer_hasUnitsThatNeedAIUpdate);CivRegisterAfter<CivHooks::CvPlayer_hasUnitsThatNeedAIUpdate>(host, &AfterCvPlayer_hasUnitsThatNeedAIUpdate);CivRegisterReplace<CivHooks::CvPlayer_hasUnitsThatNeedAIUpdate>(host, &ReplaceCvPlayer_hasUnitsThatNeedAIUpdate);

Code

27854bool CvPlayer::hasUnitsThatNeedAIUpdate() const27855{27856	const CvUnit* pLoopUnit;27857	int iLoop;2785827859	for(pLoopUnit = firstUnit(&iLoop); pLoopUnit; pLoopUnit = nextUnit(&iLoop))27860	{27861		if(!pLoopUnit->TurnProcessed() &&27862		        (pLoopUnit->IsAutomated() &&27863		         pLoopUnit->AI_getUnitAIType() != UNITAI_UNKNOWN &&27864		         pLoopUnit->canMove()))27865		{27866			return true;27867		}27868	}2786927870	return false;27871}

Calls

Called by