Hello, just one minor thing. Why did I do this again? :\

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40369
This commit is contained in:
Scott Ehlert 2007-04-06 21:01:43 +00:00
parent 9c562a9e62
commit 50cc1b7356
3 changed files with 7 additions and 6 deletions

View File

@ -454,14 +454,9 @@ void CSmmAPI::ClientConPrintf(edict_t *client, const char *fmt, ...)
void CSmmAPI::LoadAsVSP() void CSmmAPI::LoadAsVSP()
{ {
char path[260];
if (!GetFileOfAddress(CreateInterface, path, sizeof(path)))
{
/* Failed! */
}
char command[350]; char command[350];
g_VspListener.SetLoadable(true); g_VspListener.SetLoadable(true);
UTIL_Format(command, sizeof(command), "plugin_load \"%s\"\n", path); UTIL_Format(command, sizeof(command), "plugin_load \"%s\"\n", g_SmmPath.c_str());
g_Engine.engine->ServerCommand(command); g_Engine.engine->ServerCommand(command);
} }

View File

@ -50,6 +50,7 @@ SourceHook::CSourceHookImpl g_SourceHook;
SourceHook::ISourceHook *g_SHPtr = &g_SourceHook; SourceHook::ISourceHook *g_SHPtr = &g_SourceHook;
SourceHook::String g_ModPath; SourceHook::String g_ModPath;
SourceHook::String g_BinPath; SourceHook::String g_BinPath;
SourceHook::String g_SmmPath;
PluginId g_PLID = Pl_Console; /* Technically, SourceMM is the "Console" plugin... :p */ PluginId g_PLID = Pl_Console; /* Technically, SourceMM is the "Console" plugin... :p */
bool bInFirstLevel = true; bool bInFirstLevel = true;
bool gParsedGameInfo = false; bool gParsedGameInfo = false;
@ -249,6 +250,8 @@ SMM_API void *CreateInterface(const char *iface, int *ret)
return NULL; return NULL;
} }
g_SmmPath.assign(smmPath);
/* Get value of -game from command line, defaulting to hl2 as engine seems to do */ /* Get value of -game from command line, defaulting to hl2 as engine seems to do */
gameDir = CommandLine()->ParmValue("-game", "hl2"); gameDir = CommandLine()->ParmValue("-game", "hl2");

View File

@ -102,6 +102,9 @@ extern SourceHook::String g_ModPath;
/** @brief Path to server binary */ /** @brief Path to server binary */
extern SourceHook::String g_BinPath; extern SourceHook::String g_BinPath;
/** @brief Path to SourceMM binary */
extern SourceHook::String g_SmmPath;
/** @brief Global variable for SourceHook macros */ /** @brief Global variable for SourceHook macros */
extern SourceHook::ISourceHook *g_SHPtr; extern SourceHook::ISourceHook *g_SHPtr;