CvPreGame::canReadyLocalPlayer()
- Defined in
- CvPreGame.cpp, line 3478
- Hook name
CivHooks::CvPreGame_canReadyLocalPlayer
Hooks
static bool BeforeCvPreGame_canReadyLocalPlayer(bool& result);static void AfterCvPreGame_canReadyLocalPlayer(bool& result);static bool ReplaceCvPreGame_canReadyLocalPlayer(bool (*original)());CivRegisterBefore<CivHooks::CvPreGame_canReadyLocalPlayer>(host, &BeforeCvPreGame_canReadyLocalPlayer);CivRegisterAfter<CivHooks::CvPreGame_canReadyLocalPlayer>(host, &AfterCvPreGame_canReadyLocalPlayer);CivRegisterReplace<CivHooks::CvPreGame_canReadyLocalPlayer>(host, &ReplaceCvPreGame_canReadyLocalPlayer);
Code
3477// Can the player be readied?3478bool canReadyLocalPlayer()3479{3480 for(int itr = 0; itr < MAX_PLAYERS; ++itr)3481 {3482 if(slotStatus((PlayerTypes)itr) != SS_CLOSED && !CvPreGame::civilizationKeyAvailable((PlayerTypes)itr))3483 return false;3484 }34853486 // Also check to see if they have the requested map script3487 if (mapScriptName().GetLength() > 0)3488 {3489 if (!FFILESYSTEM.Exist(mapScriptName()))3490 return false;3491 }3492 return true;3493}
Calls
- CvPreGame::civilizationKeyAvailable(PlayerTypes)
- CvPreGame::mapScriptName()
- CvPreGame::slotStatus(PlayerTypes)
CvString::GetLengthCvString::operator const char *FIFileSystem::ExistFIFileSystem::GetInstance