CvHomelandAI::Init(CvPlayer *)
- Defined in
- CvHomelandAI.cpp, line 50
- Class
- CvHomelandAI
- Hook name
CivHooks::CvHomelandAI_Init
Hooks
static bool BeforeCvHomelandAI_Init(CvHomelandAI* self, CvPlayer* pPlayer);static void AfterCvHomelandAI_Init(CvHomelandAI* self, CvPlayer* pPlayer);static void ReplaceCvHomelandAI_Init(void (*original)(CvHomelandAI*, CvPlayer*), CvHomelandAI* self, CvPlayer* pPlayer);CivRegisterBefore<CivHooks::CvHomelandAI_Init>(host, &BeforeCvHomelandAI_Init);CivRegisterAfter<CivHooks::CvHomelandAI_Init>(host, &AfterCvHomelandAI_Init);CivRegisterReplace<CivHooks::CvHomelandAI_Init>(host, &ReplaceCvHomelandAI_Init);
Code
49/// Initialize50void CvHomelandAI::Init(CvPlayer* pPlayer)51{52 // Store off the pointer to the objects we need elsewhere in the game engine53 m_pPlayer = pPlayer;5455 Reset();5657 // Initialize AI constants from XML58 m_iRandomRange = GC.getAI_HOMELAND_MOVE_PRIORITY_RANDOMNESS();59 m_iDefensiveMoveTurns = GC.getAI_HOMELAND_MAX_DEFENSIVE_MOVE_TURNS();60 m_iUpgradeMoveTurns = GC.getAI_HOMELAND_MAX_UPGRADE_MOVE_TURNS();61 m_fFlavorDampening = GC.getAI_TACTICAL_FLAVOR_DAMPENING_FOR_MOVE_PRIORITIZATION();62}