Add an interpreter because. (bug 5902, r=ds).
This commit is contained in:
+4
-1
@@ -334,7 +334,10 @@ void RootConsoleMenu::OnRootConsoleCommand(const char *cmdname, const CCommand &
|
||||
{
|
||||
ConsolePrint(" SourceMod Version Information:");
|
||||
ConsolePrint(" SourceMod Version: %s", SM_VERSION_STRING);
|
||||
ConsolePrint(" SourcePawn Engine: %s (build %s)", g_pSourcePawn2->GetEngineName(), g_pSourcePawn2->GetVersionString());
|
||||
if (g_pSourcePawn2->IsJitEnabled())
|
||||
ConsolePrint(" SourcePawn Engine: %s (build %s)", g_pSourcePawn2->GetEngineName(), g_pSourcePawn2->GetVersionString());
|
||||
else
|
||||
ConsolePrint(" SourcePawn Engine: %s (build %s NO JIT)", g_pSourcePawn2->GetEngineName(), g_pSourcePawn2->GetVersionString());
|
||||
ConsolePrint(" SourcePawn API: v1 = %d, v2 = %d", g_pSourcePawn->GetEngineAPIVersion(), g_pSourcePawn2->GetAPIVersion());
|
||||
ConsolePrint(" Compiled on: %s %s", __DATE__, __TIME__);
|
||||
ConsolePrint(" Build ID: %s", SM_BUILD_UNIQUEID);
|
||||
|
||||
@@ -61,6 +61,7 @@ IForward *g_pOnMapEnd = NULL;
|
||||
IGameConfig *g_pGameConf = NULL;
|
||||
bool g_Loaded = false;
|
||||
bool sm_show_debug_spew = false;
|
||||
bool sm_disable_jit = false;
|
||||
|
||||
typedef ISourcePawnEngine *(*GET_SP_V1)();
|
||||
typedef ISourcePawnEngine2 *(*GET_SP_V2)();
|
||||
@@ -125,6 +126,14 @@ ConfigResult SourceModBase::OnSourceModConfigChanged(const char *key,
|
||||
|
||||
return ConfigResult_Accept;
|
||||
}
|
||||
else if (strcasecmp(key, "DisableJIT") == 0)
|
||||
{
|
||||
sm_disable_jit = (strcasecmp(value, "yes") == 0) ? true : false;
|
||||
if (g_pSourcePawn2)
|
||||
g_pSourcePawn2->SetJitEnabled(!sm_disable_jit);
|
||||
|
||||
return ConfigResult_Accept;
|
||||
}
|
||||
|
||||
return ConfigResult_Ignore;
|
||||
}
|
||||
@@ -242,6 +251,9 @@ bool SourceModBase::InitializeSourceMod(char *error, size_t maxlength, bool late
|
||||
|
||||
g_pSourcePawn2->SetDebugListener(logicore.debugger);
|
||||
|
||||
if (sm_disable_jit)
|
||||
g_pSourcePawn2->SetJitEnabled(!sm_disable_jit);
|
||||
|
||||
sSourceModInitialized = true;
|
||||
|
||||
/* Hook this now so we can detect startup without calling StartSourceMod() */
|
||||
|
||||
Reference in New Issue
Block a user