CvDllNetInitInfo::Commit()
- Defined in
- CvDllNetInitInfo.cpp, line 223
- Class
- CvDllNetInitInfo
- Hook name
CivHooks::CvDllNetInitInfo_Commit
Hooks
static bool BeforeCvDllNetInitInfo_Commit(CvDllNetInitInfo* self, bool& result);static void AfterCvDllNetInitInfo_Commit(CvDllNetInitInfo* self, bool& result);static bool ReplaceCvDllNetInitInfo_Commit(bool (*original)(CvDllNetInitInfo*), CvDllNetInitInfo* self);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetInitInfo_Commit::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllNetInitInfo_Commit);host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetInitInfo_Commit::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllNetInitInfo_Commit);host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetInitInfo_Commit::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllNetInitInfo_Commit);
Code
223bool CvDllNetInitInfo::Commit()224{225 // Copy the settings into our initialization data structure226227 //The map script path cannot be trusted since this structure is sent over the network.228 //Have the app search for the best candidate.229 FILogFile* logFile = LOGFILEMGR.GetLog("net_message_debug.log", 0);230231 char szMapScriptPath[1040] = {0};232 const bool bResult = gDLL->GetEvaluatedMapScriptPath(m_szMapScriptName.c_str(), szMapScriptPath, 1040);233234 CvString strMapScriptPath = szMapScriptPath;235236 logFile->DebugMsg("Evaluating Map Path: (%s)\nOriginal Path: %s\nNew Path: %s", (bResult)? "Success": "Failed", m_szMapScriptName.c_str(), strMapScriptPath.c_str());237238 CvPreGame::setMapScriptName(strMapScriptPath);239 CvPreGame::setRandomMapScript(m_bIsRandomMapScript);240 CvPreGame::setTransferredMap(false); // We'll always set this manually241 CvPreGame::setLoadFileName(m_szLoadFileName, m_eLoadFileStorage);242 CvPreGame::setMapNoPlayers(m_bWBMapNoPlayers);243 CvPreGame::setWorldSize(m_eWorldSize,false);244 CvPreGame::setRandomWorldSize(m_bIsRandomWorldSize);245 CvPreGame::setClimate(m_eClimate);246 CvPreGame::setSeaLevel(m_eSeaLevel);247 CvPreGame::setEra(m_eEra);248 CvPreGame::setCalendar(m_eCalendar);249 CvPreGame::setGameTurn(m_iGameTurn);250 CvPreGame::setGameStarted(m_bGameStarted);251 CvPreGame::setGameSpeed(m_eGameSpeed);252 CvPreGame::setTurnTimer(m_eTurnTimerEnabled);253 CvPreGame::setPitBossTurnTime(m_iTurnTimerTime);254 CvPreGame::setGameName(m_szGameName);255 CvPreGame::setSyncRandomSeed(m_uiSyncRandSeed);256 CvPreGame::setMapRandomSeed(m_uiMapRandSeed);257 CvPreGame::setVictories(m_abVictories);258 CvPreGame::SetGameOptions(m_aGameOptions);259 CvPreGame::SetMapOptions(m_aMapOptions);260 CvPreGame::setMultiplayerOptions(m_abMPOptions);261 CvPreGame::setMaxTurns(m_iMaxTurns);262 CvPreGame::setMaxCityElimination(m_iMaxCityElimination);263 CvPreGame::setNumMinorCivs(m_iNumMinorCivs);264 CvPreGame::setAdvancedStartPoints(m_iNumAdvancedStartPoints);265 CvPreGame::setGameMode(m_eMode);266267 return true;268}
Calls
- CvGlobals::getDLLIFace()
- CvPreGame::setAdvancedStartPoints(int)
- CvPreGame::setCalendar(CalendarTypes)
- CvPreGame::setClimate(ClimateTypes)
- CvPreGame::setEra(EraTypes)
- CvPreGame::setGameMode(GameMode)
- CvPreGame::setGameName(const CvString &)
- CvPreGame::SetGameOptions(const std::vector<CustomOption> &)
- CvPreGame::setGameSpeed(GameSpeedTypes)
- CvPreGame::setGameStarted(bool)
- CvPreGame::setGameTurn(int)
- CvPreGame::setLoadFileName(const CvString &, StorageLocation)
- CvPreGame::setMapNoPlayers(bool)
- CvPreGame::SetMapOptions(const std::vector<CustomOption> &)
- CvPreGame::setMapRandomSeed(unsigned int)
- CvPreGame::setMapScriptName(const CvString &)
- CvPreGame::setMaxCityElimination(int)
- CvPreGame::setMaxTurns(int)
- CvPreGame::setMultiplayerOptions(const std::vector<bool> &)
- CvPreGame::setNumMinorCivs(int)
- CvPreGame::setPitBossTurnTime(int)
- CvPreGame::setRandomMapScript(bool)
- CvPreGame::setRandomWorldSize(bool)
- CvPreGame::setSeaLevel(SeaLevelTypes)
- CvPreGame::setSyncRandomSeed(unsigned int)
- CvPreGame::setTransferredMap(bool)
- CvPreGame::setTurnTimer(TurnTimerTypes)
- CvPreGame::setVictories(const std::vector<bool> &)
- CvPreGame::setWorldSize(WorldSizeTypes, bool)
CvString::CvStringFILogFile::DebugMsgFILogFileMgr::GetInstanceFILogFileMgr::GetLogICvEngineUtility4::GetEvaluatedMapScriptPathstd::basic_string::c_str