CvPlayerAI::AI_doResearch()
- Defined in
- CvPlayerAI.cpp, line 845
- Class
- CvPlayerAI
- Hook name
CivHooks::CvPlayerAI_AI_doResearch
Hooks
static bool BeforeCvPlayerAI_AI_doResearch(CvPlayerAI* self);static void AfterCvPlayerAI_AI_doResearch(CvPlayerAI* self);static void ReplaceCvPlayerAI_AI_doResearch(void (*original)(CvPlayerAI*), CvPlayerAI* self);CivRegisterBefore<CivHooks::CvPlayerAI_AI_doResearch>(host, &BeforeCvPlayerAI_AI_doResearch);CivRegisterAfter<CivHooks::CvPlayerAI_AI_doResearch>(host, &AfterCvPlayerAI_AI_doResearch);CivRegisterReplace<CivHooks::CvPlayerAI_AI_doResearch>(host, &ReplaceCvPlayerAI_AI_doResearch);
Code
845void CvPlayerAI::AI_doResearch()846{847 CvAssertMsg(!isHuman(), "isHuman did not return false as expected");848849 if(GetPlayerTechs()->GetCurrentResearch() == NO_TECH)850 {851 AI_chooseResearch();852 //AI_forceUpdateStrategies(); //to account for current research.853 }854}