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

Method DoGlobalPluginLoads

core/sourcemod.cpp:390–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390void SourceModBase::DoGlobalPluginLoads()
391{
392 char config_path[PLATFORM_MAX_PATH];
393 char plugins_path[PLATFORM_MAX_PATH];
394
395 BuildPath(Path_SM, config_path,
396 sizeof(config_path),
397 "configs/plugin_settings.cfg");
398 BuildPath(Path_SM, plugins_path,
399 sizeof(plugins_path),
400 "plugins");
401
402 /* Load any auto extensions */
403 extsys->TryAutoload();
404
405 /* Fire the extensions ready message */
406 g_SMAPI->MetaFactory(SOURCEMOD_NOTICE_EXTENSIONS, NULL, NULL);
407
408 /* Load any game extension */
409 const char *game_ext;
410 if ((game_ext = g_pGameConf->GetKeyValue("GameExtension")) != NULL)
411 {
412 char path[PLATFORM_MAX_PATH];
413 ke::SafeSprintf(path, sizeof(path), "%s.ext." PLATFORM_LIB_EXT, game_ext);
414 extsys->LoadAutoExtension(path);
415 }
416
417 scripts->LoadAll(config_path, plugins_path);
418}
419
420size_t SourceModBase::BuildPath(PathType type, char *buffer, size_t maxlength, const char *format, ...)
421{

Callers 2

do_global_plugin_loadsFunction · 0.80
OnRootConsoleCommandMethod · 0.80

Calls 4

TryAutoloadMethod · 0.80
LoadAutoExtensionMethod · 0.80
LoadAllMethod · 0.80
GetKeyValueMethod · 0.45

Tested by

no test coverage detected