Skip to content

Commit

Permalink
Fix: Support auto lag kick for spectators in lobby
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Jul 8, 2024
1 parent 216694b commit 2d4ce35
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/multiplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,17 @@ void autoLagKickRoutine()
uint32_t totalNumPlayers = 0;

ingame.lastLagCheck = now;
uint32_t playerCheckLimit = (isInitialLoad) ? MAX_CONNECTED_PLAYERS : MAX_PLAYERS;
uint32_t playerCheckLimit = (isLobby || isInitialLoad) ? MAX_CONNECTED_PLAYERS : MAX_PLAYERS;
for (uint32_t i = 0; i < playerCheckLimit; ++i)
{
if (!isHumanPlayer(i))
{
continue;
}
if (i == NetPlay.hostPlayer)
{
continue;
}
if (i > MAX_PLAYERS && !gtimeShouldWaitForPlayer(i))
{
continue;
Expand Down

0 comments on commit 2d4ce35

Please sign in to comment.