CvGame::UpdatePlayers()
- Defined in
- CvGame.cpp, line 8643
- Class
- CvGame
- Hook name
CivHooks::CvGame_UpdatePlayers
Hooks
static bool BeforeCvGame_UpdatePlayers(CvGame* self);static void AfterCvGame_UpdatePlayers(CvGame* self);static void ReplaceCvGame_UpdatePlayers(void (*original)(CvGame*), CvGame* self);CivRegisterBefore<CivHooks::CvGame_UpdatePlayers>(host, &BeforeCvGame_UpdatePlayers);CivRegisterAfter<CivHooks::CvGame_UpdatePlayers>(host, &AfterCvGame_UpdatePlayers);CivRegisterReplace<CivHooks::CvGame_UpdatePlayers>(host, &ReplaceCvGame_UpdatePlayers);
Code
8643void CvGame::UpdatePlayers()8644{8645 int numActive = 0;8646 for(int i = 0; i < MAX_PLAYERS; i++)8647 {8648 CvPlayer& kPlayer = GET_PLAYER((PlayerTypes)i);8649 // slewis - should it check for active turn?8650 if(kPlayer.isAlive() && kPlayer.isTurnActive())8651 {8652 kPlayer.UpdateNotifications();8653 ++numActive;8654 }8655 }8656 CvAssert(numActive == getNumGameTurnActive());8657}