mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-20 13:54:14 +01:00
Mm, oopsy. ICvar::GetCommandLineValue could return NULL for the plugins file. That would be bad. :(
(Now fixed with a call to GetPluginsFile in case it is NULL) --HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40192
This commit is contained in:
parent
563b890ba6
commit
07507bb51a
@ -135,8 +135,13 @@ bool DLLInit(CreateInterfaceFn engineFactory, CreateInterfaceFn physicsFactory,
|
|||||||
LogMessage("[META] Warning: Console messages will not be redirected to rcon console.");
|
LogMessage("[META] Warning: Console messages will not be redirected to rcon console.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char *pluginFile = g_Engine.icvar->GetCommandLineValue("mm_pluginsfile");
|
||||||
|
if (!pluginFile)
|
||||||
|
pluginFile = GetPluginsFile();
|
||||||
|
|
||||||
char full_path[260];
|
char full_path[260];
|
||||||
g_SmmAPI.PathFormat(full_path, sizeof(full_path)-1, "%s/%s", g_ModPath.c_str(), g_Engine.icvar->GetCommandLineValue("mm_pluginsfile"));
|
g_SmmAPI.PathFormat(full_path, sizeof(full_path)-1, "%s/%s", g_ModPath.c_str(), pluginFile);
|
||||||
|
|
||||||
LoadPluginsFromFile(full_path);
|
LoadPluginsFromFile(full_path);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user