mirror of
https://github.com/rehlds/metamod-r.git
synced 2025-01-14 15:47:54 +03:00
Merge pull request #28 from In-line/AddPluginsFile
Add mm_pluginsfile option
This commit is contained in:
commit
2e23956a45
@ -186,6 +186,18 @@ void metamod_startup()
|
|||||||
//
|
//
|
||||||
// In fact, we need gamedir even earlier, so moved up above.
|
// In fact, we need gamedir even earlier, so moved up above.
|
||||||
|
|
||||||
|
const char *pf = LOCALINFO("mm_pluginsfile");
|
||||||
|
if (pf && *pf != '\0') {
|
||||||
|
META_LOG("Pluginfile specified via localinfo: %s", pf);
|
||||||
|
|
||||||
|
if (is_file_exists_in_gamedir(pf)) {
|
||||||
|
Q_strlcpy(pluginFile, pf);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
META_ERROR("Empty/missing plugins.ini file: %s; falling back to %s", pf, pluginFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Load plugins file
|
// Load plugins file
|
||||||
if (!is_file_exists_in_gamedir(pluginFile)) {
|
if (!is_file_exists_in_gamedir(pluginFile)) {
|
||||||
Q_strlcpy(pluginFile, g_config->directory());
|
Q_strlcpy(pluginFile, g_config->directory());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user