CvPlayer::InitPlots()
- Defined in
- CvPlayer.cpp, line 26323
- Class
- CvPlayer
- Hook name
CivHooks::CvPlayer_InitPlots
Hooks
static bool BeforeCvPlayer_InitPlots(CvPlayer* self);static void AfterCvPlayer_InitPlots(CvPlayer* self);static void ReplaceCvPlayer_InitPlots(void (*original)(CvPlayer*), CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_InitPlots>(host, &BeforeCvPlayer_InitPlots);CivRegisterAfter<CivHooks::CvPlayer_InitPlots>(host, &AfterCvPlayer_InitPlots);CivRegisterReplace<CivHooks::CvPlayer_InitPlots>(host, &ReplaceCvPlayer_InitPlots);
Code
26322/// This sets up the m_aiPlots array that is used to contain which plots the player contains26323void CvPlayer::InitPlots(void)26324{26325 int iNumPlots = GC.getMap().getGridHeight() * GC.getMap().getGridHeight();26326 // in case we're loading26327 if(iNumPlots != m_aiPlots.size())26328 {26329 m_aiPlots.clear();26330 m_aiPlots.push_back_copy(-1, iNumPlots);26331 }26332}
Calls
BaseVector::clearBaseVector::size- CvGlobals::getMap()
- CvMap::getGridHeight() const
FStaticVector::push_back_copy