CvPreGame::numHumans()
- Defined in
- CvPreGame.cpp, line 1652
- Hook name
CivHooks::CvPreGame_numHumans
Hooks
static bool BeforeCvPreGame_numHumans(int& result);static void AfterCvPreGame_numHumans(int& result);static int ReplaceCvPreGame_numHumans(int (*original)());CivRegisterBefore<CivHooks::CvPreGame_numHumans>(host, &BeforeCvPreGame_numHumans);CivRegisterAfter<CivHooks::CvPreGame_numHumans>(host, &AfterCvPreGame_numHumans);CivRegisterReplace<CivHooks::CvPreGame_numHumans>(host, &ReplaceCvPreGame_numHumans);
Code
1652int numHumans()1653{1654 int iNumHumans = 0;1655 for(int i = 0; i < MAX_CIV_PLAYERS; ++i)1656 {1657 if(isHuman((PlayerTypes)i))1658 {1659 ++iNumHumans;1660 }1661 }1662 return iNumHumans;1663}