From e3b76496da7936d8b77832f7a0d182d8c1b69e9a Mon Sep 17 00:00:00 2001 From: lipsanen Date: Sat, 9 Nov 2024 17:37:43 +0200 Subject: [PATCH 1/2] Disable ImGui callbacks when not using ImGui --- spt/features/visualizations/imgui/imgui_interface.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spt/features/visualizations/imgui/imgui_interface.cpp b/spt/features/visualizations/imgui/imgui_interface.cpp index 8a2d52f6a..fdc631534 100644 --- a/spt/features/visualizations/imgui/imgui_interface.cpp +++ b/spt/features/visualizations/imgui/imgui_interface.cpp @@ -1006,6 +1006,8 @@ void SptImGui::RegisterHudCvarCheckbox(ConVar& var) void SptImGui::RegisterHudCvarCallback(ConVar& var, const SptImGuiHudTextCallback& cb, bool putInCollapsible) { + if (!Loaded()) + return; Assert(cb); auto emp = SptImGuiFeature::hudCvars.emplace(var, cb, putInCollapsible); AssertMsg(emp.second, "each hud cvar should not be registered more than once to imgui"); From 8fd38e803a8522c8d1da6ed11f1cc5de245575bc Mon Sep 17 00:00:00 2001 From: lipsanen Date: Thu, 21 Nov 2024 22:01:26 +0200 Subject: [PATCH 2/2] Fix for 20th anniversary update --- spt/features/playerio.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spt/features/playerio.cpp b/spt/features/playerio.cpp index 20119aefe..aaf25332c 100644 --- a/spt/features/playerio.cpp +++ b/spt/features/playerio.cpp @@ -136,8 +136,13 @@ void PlayerIOFeature::PreHook() int index = GetPatternIndex((void**)&ORIG_CreateMove); CreateMoveSignal.Works = true; - // New steampipe hl2/portal have a different offset - if (!utils::DoesGameLookLikeHLS() && utils::GetBuildNumber() >= 7122284) + // 20th Anniversary update + if (!utils::DoesGameLookLikeHLS() && !utils::DoesGameLookLikePortal() && utils::GetBuildNumber() >= 9353166) + { + offM_pCommands = 228; + } + // New steampipe hl2/portal + else if (!utils::DoesGameLookLikeHLS() && utils::GetBuildNumber() >= 7122284) { offM_pCommands = 224; }