MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / LookupScript

Method LookupScript

ogsr_engine/COMMON_AI/script_engine.cpp:221–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221bool CScriptEngine::LookupScript(string_path& fname, const char* base)
222{
223 string_path lc_base;
224 if (xray_scripts.empty())
225 {
226 FS.update_path(lc_base, "$game_scripts$", "");
227 CollectScriptFiles(lc_base);
228 }
229 strcpy_s(lc_base, base);
230 _strlwr_s(lc_base);
231 auto it = xray_scripts.find(lc_base);
232 if (it != xray_scripts.end())
233 {
234 strcpy_s(fname, it->second.c_str());
235 return true;
236 }
237 return false;
238}
239
240bool CScriptEngine::process_file_if_exists(const char* file_name, bool warn_if_not_exist) // KRodin: Функция проверяет существует ли скрипт на диске. Если существует - отправляет
241 // его в do_file. Вызывается из process_file, auto_load и не только.

Callers

nothing calls this directly

Calls 5

emptyMethod · 0.45
update_pathMethod · 0.45
findMethod · 0.45
endMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected