Skip to content

Commit

Permalink
Merge branch 'praydog:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyhodge authored Oct 14, 2024
2 parents a42131e + 9a65668 commit 69f76e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions shared/sdk/SF6Utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions src/mods/ScriptRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -828,13 +830,15 @@ 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()) {
sdk::sf6::set_game_mode((sdk::sf6::EGameMode)bt.value());
}
});
}
#endif
}

void ScriptRunner::on_frame() {
Expand Down

0 comments on commit 69f76e1

Please sign in to comment.