Skip to content

Commit

Permalink
fix: correctly stall doubles clients on frame 8 until all loaded
Browse files Browse the repository at this point in the history
prior to this change if someone loaded really slow the other clients could actually get very far ahead and potentially cause crashes
  • Loading branch information
JLaferri authored and NikhilNarayana committed Feb 7, 2022
1 parent 9142c64 commit eb8b3b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/Core/Core/Slippi/SlippiNetplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1248,13 +1248,15 @@ int32_t SlippiNetplayClient::GetSlippiLatestRemoteFrame(int maxFrameCount)
{
// Return the lowest frame among remote queues
int lowestFrame = 0;
bool isFrameSet = false;
for (int i = 0; i < m_remotePlayerCount; i++)
{
auto rp = GetSlippiRemotePad(i, maxFrameCount);
int f = rp->latestFrame;
if (f < lowestFrame || lowestFrame == 0)
if (f < lowestFrame || !isFrameSet)
{
lowestFrame = f;
isFrameSet = true;
}
}

Expand Down

0 comments on commit eb8b3b9

Please sign in to comment.