mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-26 12:16:20 +00:00
pull in project-slippi/Ishiiruka/commit/dd0677d5d2dfcc976671dff779160c26cb420d0d
This commit is contained in:
parent
3019b05f0a
commit
cdef62f577
1 changed files with 23 additions and 12 deletions
|
@ -2302,19 +2302,30 @@ void CEXISlippi::prepareOnlineMatchState()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overwrite local player character
|
// Check if everyone is the same color
|
||||||
onlineMatchBlock[0x60 + (lps.playerIdx) * 0x24] = lps.characterId;
|
auto color = orderedSelections[0].teamId;
|
||||||
onlineMatchBlock[0x63 + (lps.playerIdx) * 0x24] = lps.characterColor;
|
bool areAllSameTeam = true;
|
||||||
onlineMatchBlock[0x67 + (lps.playerIdx) * 0x24] = 0;
|
for (const auto& s : orderedSelections)
|
||||||
onlineMatchBlock[0x69 + (lps.playerIdx) * 0x24] = lps.teamId;
|
|
||||||
|
|
||||||
// Overwrite remote player character
|
|
||||||
for (int i = 0; i < remotePlayerCount; i++)
|
|
||||||
{
|
{
|
||||||
u8 idx = rps[i].playerIdx;
|
if (s.teamId != color)
|
||||||
onlineMatchBlock[0x60 + idx * 0x24] = rps[i].characterId;
|
areAllSameTeam = false;
|
||||||
onlineMatchBlock[0x63 + idx * 0x24] = rps[i].characterColor;
|
}
|
||||||
onlineMatchBlock[0x69 + idx * 0x24] = rps[i].teamId;
|
|
||||||
|
// Overwrite player character choices
|
||||||
|
for (auto& s : orderedSelections)
|
||||||
|
{
|
||||||
|
if (areAllSameTeam)
|
||||||
|
{
|
||||||
|
// Overwrite teamId
|
||||||
|
// TODO: overwrite color
|
||||||
|
s.teamId = s.playerIdx <= 1 ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Overwrite player character
|
||||||
|
onlineMatchBlock[0x60 + (s.playerIdx) * 0x24] = s.characterId;
|
||||||
|
onlineMatchBlock[0x63 + (s.playerIdx) * 0x24] = s.characterColor;
|
||||||
|
onlineMatchBlock[0x67 + (s.playerIdx) * 0x24] = 0;
|
||||||
|
onlineMatchBlock[0x69 + (s.playerIdx) * 0x24] = s.teamId;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle Singles/Teams specific logic
|
// Handle Singles/Teams specific logic
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue