mirror of
https://github.com/rehlds/metamod-r.git
synced 2025-03-03 17:15:26 +03:00
Add mm_pluginsfile option
This commit is contained in:
parent
082b8c4dd9
commit
f1d09c5085
@ -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