From 9a65668bb38469904f05d4f10f660c2666258352 Mon Sep 17 00:00:00 2001 From: praydog Date: Sun, 13 Oct 2024 15:22:00 -0700 Subject: [PATCH] SF6: Fix recent softlocks seen probably --- shared/sdk/SF6Utility.hpp | 7 +++++-- src/mods/ScriptRunner.cpp | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/shared/sdk/SF6Utility.hpp b/shared/sdk/SF6Utility.hpp index 02555458b..adde91a87 100644 --- a/shared/sdk/SF6Utility.hpp +++ b/shared/sdk/SF6Utility.hpp @@ -28,8 +28,11 @@ enum class EGameMode : uint8_t { ONLINE_TRAINING = 18, TEAMBATTLE = 19, EXAM_CPU_MATCH = 20, - REPLAY = 21, - SPECTATE = 22, + CABINET_CPU_MATCH = 21, + LEARNING_AI_MATCH = 22, + LEARNING_AI_SPECTATE = 23, + REPLAY = 24, + SPECTATE = 25, }; enum class HUD_GROUP_TYPE : uint8_t { diff --git a/src/mods/ScriptRunner.cpp b/src/mods/ScriptRunner.cpp index 186224d3d..99f4f38d2 100644 --- a/src/mods/ScriptRunner.cpp +++ b/src/mods/ScriptRunner.cpp @@ -783,6 +783,8 @@ void ScriptRunner::on_config_save(utility::Config& cfg) { } void ScriptRunner::hook_battle_rule() { + // Removed for now as it seems to cause some weird issues with matchmaking +#if 0 if (m_attempted_hook_battle_rule) { return; } @@ -828,6 +830,7 @@ void ScriptRunner::hook_battle_rule() { return HookManager::PreHookResult::CALL_ORIGINAL; }, [this](uintptr_t& ret_val, sdk::RETypeDefinition* ret_ty, uintptr_t ret_addr) -> void { + // DONT set this, it probably breaks something now auto bt = this->get_last_battle_type(); if (bt.has_value()) { @@ -835,6 +838,7 @@ void ScriptRunner::hook_battle_rule() { } }); } +#endif } void ScriptRunner::on_frame() {