Move the "sm" command to core/logic.
This commit is contained in:
@@ -57,6 +57,10 @@ void RootConsoleMenu::OnSourceModStartup(bool late)
|
||||
|
||||
bridge->DefineCommand("sm_dump_handles", "Dumps Handle usage to a file for finding Handle leaks",
|
||||
sm_dump_handles);
|
||||
bridge->DefineCommand("sm", "SourceMod Menu", [this] (int client, const ICommandArgs *args) -> bool {
|
||||
GotRootCmd(args);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
void RootConsoleMenu::OnSourceModAllInitialized()
|
||||
@@ -281,4 +285,5 @@ static bool sm_dump_handles(int client, const ICommandArgs *args)
|
||||
|
||||
g_HandleSys.Dump(write_handles_to_log);
|
||||
fclose(fp);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -114,11 +114,6 @@ static void RegisterProfiler(IProfilingTool *tool)
|
||||
g_ProfileToolManager.RegisterTool(tool);
|
||||
}
|
||||
|
||||
static void OnRootCommand(const ICommandArgs *args)
|
||||
{
|
||||
g_RootMenu.GotRootCmd(args);
|
||||
}
|
||||
|
||||
// Defined in smn_filesystem.cpp.
|
||||
extern bool OnLogPrint(const char *msg);
|
||||
|
||||
@@ -150,7 +145,6 @@ static sm_logic_t logic =
|
||||
GenerateError,
|
||||
AddNatives,
|
||||
RegisterProfiler,
|
||||
OnRootCommand,
|
||||
CDataPack::New,
|
||||
CDataPack::Free,
|
||||
&g_PluginSys,
|
||||
|
||||
Reference in New Issue
Block a user