Skip to content

Commit 9a65668

Browse files
committed
SF6: Fix recent softlocks seen probably
1 parent f19a6f3 commit 9a65668

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

shared/sdk/SF6Utility.hpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ enum class EGameMode : uint8_t {
2828
ONLINE_TRAINING = 18,
2929
TEAMBATTLE = 19,
3030
EXAM_CPU_MATCH = 20,
31-
REPLAY = 21,
32-
SPECTATE = 22,
31+
CABINET_CPU_MATCH = 21,
32+
LEARNING_AI_MATCH = 22,
33+
LEARNING_AI_SPECTATE = 23,
34+
REPLAY = 24,
35+
SPECTATE = 25,
3336
};
3437

3538
enum class HUD_GROUP_TYPE : uint8_t {

src/mods/ScriptRunner.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,8 @@ void ScriptRunner::on_config_save(utility::Config& cfg) {
783783
}
784784

785785
void ScriptRunner::hook_battle_rule() {
786+
// Removed for now as it seems to cause some weird issues with matchmaking
787+
#if 0
786788
if (m_attempted_hook_battle_rule) {
787789
return;
788790
}
@@ -828,13 +830,15 @@ void ScriptRunner::hook_battle_rule() {
828830
return HookManager::PreHookResult::CALL_ORIGINAL;
829831
},
830832
[this](uintptr_t& ret_val, sdk::RETypeDefinition* ret_ty, uintptr_t ret_addr) -> void {
833+
// DONT set this, it probably breaks something now
831834
auto bt = this->get_last_battle_type();
832835

833836
if (bt.has_value()) {
834837
sdk::sf6::set_game_mode((sdk::sf6::EGameMode)bt.value());
835838
}
836839
});
837840
}
841+
#endif
838842
}
839843

840844
void ScriptRunner::on_frame() {

0 commit comments

Comments
 (0)