Fix download freezes (well, most of them)

This commit is contained in:
Louis-Antoine 2017-10-25 10:32:48 +02:00
parent 2223283208
commit 67aba2648c
2 changed files with 13 additions and 11 deletions

View file

@ -3120,16 +3120,19 @@ static boolean SV_AddWaitingPlayers(void)
{ {
newplayer = true; newplayer = true;
// search for a free playernum if (netgame)
// we can't use playeringame since it is not updated here newplayernum = node; // OMFG SAY WELCOME TO TEH NEW HACK FOR FIX FIL DOWNLOAD!!1!
for (; newplayernum < MAXPLAYERS; newplayernum++) else
{ // search for a free playernum
for (n = 0; n < MAXNETNODES; n++) // we can't use playeringame since it is not updated here
if (nodetoplayer[n] == newplayernum || nodetoplayer2[n] == newplayernum) for (; newplayernum < MAXPLAYERS; newplayernum++)
{
for (n = 0; n < MAXNETNODES; n++)
if (nodetoplayer[n] == newplayernum || nodetoplayer2[n] == newplayernum)
break;
if (n == MAXNETNODES)
break; break;
if (n == MAXNETNODES) }
break;
}
// should never happen since we check the playernum // should never happen since we check the playernum
// before accepting the join // before accepting the join

View file

@ -498,8 +498,7 @@ static void cleanupnodes(void)
// Why can't I start at zero? // Why can't I start at zero?
for (j = 1; j < MAXNETNODES; j++) for (j = 1; j < MAXNETNODES; j++)
//if (!(nodeingame[j] || SV_SendingFile(j))) if (!(nodeingame[j] || SV_SendingFile(j)))
if (!nodeingame[j])
nodeconnected[j] = false; nodeconnected[j] = false;
} }