diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceSlippi.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceSlippi.cpp index 98422bb98f..cb0bd7fdb9 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceSlippi.cpp +++ b/Source/Core/Core/HW/EXI/EXI_DeviceSlippi.cpp @@ -2315,10 +2315,15 @@ void CEXISlippi::prepareOnlineMatchState() areAllSameTeam = false; } - // Randomize assignments to randomize teams when all same color - std::vector teamAssignments = {0, 0, 1, 1}; - generator.seed(rngOffset); - std::shuffle(teamAssignments.begin(), teamAssignments.end(), generator); + // Choose random team assignments + // Previously there was a bug here where the shuffle was not consistent across platforms given + // the same seed, this would cause desyncs during cross platform play (different teams). Got + // around this by no longer using the shuffle function... + std::vector> teamAssignmentPermutations = { + {0, 0, 1, 1}, {1, 1, 0, 0}, {0, 1, 1, 0}, {1, 0, 0, 1}, {0, 1, 0, 1}, {1, 0, 1, 0}, + }; + auto teamAssignments = + teamAssignmentPermutations[rngOffset % teamAssignmentPermutations.size()]; // Overwrite player character choices for (auto& s : orderedSelections)