Bazaar developer reference

CvPreGame::ResetGameOptions()

Defined in
CvPreGame.cpp, line 2017
Hook name
CivHooks::CvPreGame_ResetGameOptions

Hooks

static bool BeforeCvPreGame_ResetGameOptions();static void AfterCvPreGame_ResetGameOptions();static void ReplaceCvPreGame_ResetGameOptions(void (*original)());CivRegisterBefore<CivHooks::CvPreGame_ResetGameOptions>(host, &BeforeCvPreGame_ResetGameOptions);CivRegisterAfter<CivHooks::CvPreGame_ResetGameOptions>(host, &AfterCvPreGame_ResetGameOptions);CivRegisterReplace<CivHooks::CvPreGame_ResetGameOptions>(host, &ReplaceCvPreGame_ResetGameOptions);

Code

2017void ResetGameOptions()2018{2019	s_GameOptions.clear();2020	s_GameOptionsHash.clear();2021	for(size_t i = 0; i < s_GameOptions.size(); i++)2022	{2023		const CustomOption& kOption = s_GameOptions[i];2024		s_GameOptionsHash[FString::Hash(kOption.GetName())] = i;2025	}2026	SyncGameOptionsWithEnumList();20272028	// victory conditions2029	s_numVictoryInfos = GC.getNumVictoryInfos();2030	s_victories.clear();2031	if(s_numVictoryInfos > 0)2032	{2033		for(int i = 0; i < s_numVictoryInfos; ++i)2034		{2035			s_victories.push_back(true);2036		}2037	}20382039}

Calls

Called by