2
0
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:
Alik Aslanyan 2018-01-31 21:09:28 +04:00
parent 082b8c4dd9
commit f1d09c5085
No known key found for this signature in database
GPG Key ID: 2C47E56B0C0281F1

View File

@ -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());