Bazaar developer reference

CvProcessProductionAI::Reset()

Defined in
CvProcessProductionAI.cpp, line 27
Class
CvProcessProductionAI
Hook name
CivHooks::CvProcessProductionAI_Reset

Hooks

static bool BeforeCvProcessProductionAI_Reset(CvProcessProductionAI* self);static void AfterCvProcessProductionAI_Reset(CvProcessProductionAI* self);static void ReplaceCvProcessProductionAI_Reset(void (*original)(CvProcessProductionAI*), CvProcessProductionAI* self);CivRegisterBefore<CivHooks::CvProcessProductionAI_Reset>(host, &BeforeCvProcessProductionAI_Reset);CivRegisterAfter<CivHooks::CvProcessProductionAI_Reset>(host, &AfterCvProcessProductionAI_Reset);CivRegisterReplace<CivHooks::CvProcessProductionAI_Reset>(host, &ReplaceCvProcessProductionAI_Reset);

Code

26/// Clear out AI local variables27void CvProcessProductionAI::Reset()28{29	m_ProcessAIWeights.clear();3031	// Loop through reading each one and add an entry with 0 weight to our vector32	for (int i = 0; i < GC.getNumProcessInfos(); i++)33	{34		m_ProcessAIWeights.push_back(i, 0);35	}36}

Calls

Called by