MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / CGameConfig

Method CGameConfig

core/logic/GameConfigs.cpp:170–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170CGameConfig::CGameConfig(const char *file, const char *engine)
171{
172 strncopy(m_File, file, sizeof(m_File));
173
174 m_CustomLevel = 0;
175 m_CustomHandler = NULL;
176
177 m_ModTime = GetFileModTime(file);
178
179 if (!engine)
180 m_pEngine = bridge->GetSourceEngineName();
181 else
182 m_pEngine = engine;
183
184 if (strcmp(m_pEngine, "css") == 0 || strcmp(m_pEngine, "dods") == 0 || strcmp(m_pEngine, "hl2dm") == 0 || strcmp(m_pEngine, "tf2") == 0)
185 this->SetBaseEngine("orangebox_valve");
186 else if (strcmp(m_pEngine, "nucleardawn") == 0)
187 this->SetBaseEngine("left4dead2");
188 else
189 this->SetBaseEngine(NULL);
190}
191
192CGameConfig::~CGameConfig()
193{

Callers

nothing calls this directly

Calls 4

SetBaseEngineMethod · 0.95
GetFileModTimeFunction · 0.85
GetSourceEngineNameMethod · 0.80
strncopyFunction · 0.70

Tested by

no test coverage detected