diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceSlippi.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceSlippi.cpp index 6c1b7772e1..a82da7fcea 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceSlippi.cpp +++ b/Source/Core/Core/HW/EXI/EXI_DeviceSlippi.cpp @@ -1873,6 +1873,16 @@ void CEXISlippi::startFindMatch(u8* payload) return; } } + else if (search.mode == SlippiMatchmaking::OnlinePlayMode::TEAMS) + { + // Some special handling for teams since it is being heavily used for unranked + if (localSelections.characterId >= 26 && + SConfig::GetInstance().m_melee_version != Melee::Version::MEX) + { + forcedError = "The character you selected is not allowed in this mode"; + return; + } + } #ifndef LOCAL_TESTING if (!isEnetInitialized) @@ -2300,6 +2310,25 @@ void CEXISlippi::prepareOnlineMatchState() return; } } + else if (lastSearch.mode == SlippiMatchmaking::OnlinePlayMode::TEAMS) + { + auto isMEX = SConfig::GetInstance().m_melee_version == Melee::Version::MEX; + + if (!localCharOk && !isMEX) + { + handleConnectionCleanup(); + forcedError = "The character you selected is not allowed in this mode"; + prepareOnlineMatchState(); + return; + } + + if (!remoteCharOk && !isMEX) + { + handleConnectionCleanup(); + prepareOnlineMatchState(); + return; + } + } // Set rng offset rngOffset = isDecider ? lps.rngOffset : rps[0].rngOffset; @@ -2371,9 +2400,10 @@ void CEXISlippi::prepareOnlineMatchState() } // Turn pause off in unranked/ranked, on in other modes + auto pauseAllowed = !SlippiMatchmaking::IsFixedRulesMode(lastSearch.mode) && + lastSearch.mode != SlippiMatchmaking::OnlinePlayMode::TEAMS; u8* gameBitField3 = static_cast(&onlineMatchBlock[2]); - *gameBitField3 = SlippiMatchmaking::IsFixedRulesMode(lastSearch.mode) ? *gameBitField3 | 0x8 : - *gameBitField3 & 0xF7; + *gameBitField3 = pauseAllowed ? *gameBitField3 & 0xF7 : *gameBitField3 | 0x8; //*gameBitField3 = *gameBitField3 | 0x8; // Group players into left/right side for team splash screen display