Use internal sp::Environment directly in core/logic.

Also remove ISourcePawnEngine and ISourcePawnEngine2 pointers since
they're now redundant.
This commit is contained in:
David Anderson
2026-05-17 15:22:58 -07:00
parent fba9d713b7
commit 890c7119fe
35 changed files with 130 additions and 167 deletions
+5 -4
View File
@@ -28,6 +28,7 @@
#include "ProfileTools.h"
#include <stdarg.h>
#include <am-string.h>
#include <sourcepawn/vm/environment.h>
ProfileToolManager g_ProfileToolManager;
@@ -87,8 +88,8 @@ ProfileToolManager::StartFromConsole(IProfilingTool *tool)
return;
}
g_pSourcePawn2->SetProfilingTool(active_);
g_pSourcePawn2->EnableProfiling();
g_pPawnEnv->SetProfilingTool(active_);
g_pPawnEnv->EnableProfiling();
rootmenu->ConsolePrint("Started profiling with %s.", active_->Name());
default_ = active_;
@@ -117,8 +118,8 @@ ProfileToolManager::OnRootConsoleCommand(const char *cmdname, const ICommandArgs
rootmenu->ConsolePrint("No profiler is active.");
return;
}
g_pSourcePawn2->DisableProfiling();
g_pSourcePawn2->SetProfilingTool(nullptr);
g_pPawnEnv->DisableProfiling();
g_pPawnEnv->SetProfilingTool(nullptr);
active_->Stop(render_help);
active_ = nullptr;
return;