CvGame::sendPlayerOptions(bool)
- Defined in
- CvGame.cpp, line 5644
- Class
- CvGame
- Hook name
CivHooks::CvGame_sendPlayerOptions
Hooks
static bool BeforeCvGame_sendPlayerOptions(CvGame* self, bool bForce);static void AfterCvGame_sendPlayerOptions(CvGame* self, bool bForce);static void ReplaceCvGame_sendPlayerOptions(void (*original)(CvGame*, bool), CvGame* self, bool bForce);CivRegisterBefore<CivHooks::CvGame_sendPlayerOptions>(host, &BeforeCvGame_sendPlayerOptions);CivRegisterAfter<CivHooks::CvGame_sendPlayerOptions>(host, &AfterCvGame_sendPlayerOptions);CivRegisterReplace<CivHooks::CvGame_sendPlayerOptions>(host, &ReplaceCvGame_sendPlayerOptions);
Code
5644void CvGame::sendPlayerOptions(bool bForce)5645{5646 if(getActivePlayer() == NO_PLAYER)5647 {5648 return;5649 }56505651 if(!isPlayerOptionsSent() || bForce)5652 {5653 m_bPlayerOptionsSent = true;56545655 gDLL->BeginSendBundle();5656 for(int iI = 0; iI < GC.getNumPlayerOptionInfos(); iI++)5657 {5658 const PlayerOptionTypes eOption = static_cast<PlayerOptionTypes>(iI);56595660 CvPlayerOptionInfo* pkInfo = GC.getPlayerOptionInfo(eOption);5661 if (pkInfo)5662 {5663 uint uiID = FString::Hash( pkInfo->GetType() );5664 gDLL->sendPlayerOption(static_cast<PlayerOptionTypes>(uiID), gDLL->getPlayerOption(static_cast<PlayerOptionTypes>(uiID)));5665 }5666 }5667 gDLL->EndSendBundle();5668 }5669}
Calls
- CvBaseInfo::GetType() const
- CvGame::getActivePlayer() const
- CvGame::isPlayerOptionsSent() const
- CvGlobals::getDLLIFace()
- CvGlobals::getNumPlayerOptionInfos() const
- CvGlobals::getPlayerOptionInfo(PlayerOptionTypes)
FStringA::HashICvEngineUtility1::getPlayerOptionICvEngineUtility1::sendPlayerOptionICvEngineUtility3::BeginSendBundleICvEngineUtility3::EndSendBundle