use memsets here and clear pingdata too
This commit is contained in:
1 parent
52f7da69ad
commit
fc6428a0f7
1 file changed
+11
-3
+11
-3
@@ -4158,14 +4158,20 @@ void SV_ResetServer(void)
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
LUA_InvalidatePlayer(&players[i]);
|
||||
playeringame[i] = false;
|
||||
playernode[i] = UINT8_MAX;
|
||||
sprintf(player_names[i], "Player %d", i + 1);
|
||||
adminplayers[i] = -1; // Populate the entire adminplayers array with -1.
|
||||
}
|
||||
|
||||
memset(player_name_changes, 0, sizeof player_name_changes);
|
||||
|
||||
memset(playeringame, false, sizeof playeringame);
|
||||
memset(playernode, UINT8_MAX, sizeof playernode);
|
||||
|
||||
pingmeasurecount = 1;
|
||||
memset(realpingtable, 0, sizeof realpingtable);
|
||||
memset(playerpingtable, 0, sizeof playerpingtable);
|
||||
|
||||
ClearAdminPlayers();
|
||||
|
||||
mynode = 0;
|
||||
cl_packetmissed = false;
|
||||
#ifdef SATURNSYNCH
|
||||
@@ -4434,7 +4440,9 @@ static boolean SV_AddWaitingPlayers(void)
|
||||
buf[0] = (UINT8)node;
|
||||
buf[1] = newplayernum;
|
||||
if (playerpernode[node] < 1)
|
||||
{
|
||||
nodetoplayer[node] = newplayernum;
|
||||
}
|
||||
else if (playerpernode[node] < 2)
|
||||
{
|
||||
nodetoplayer2[node] = newplayernum;
|
||||
|
||||
Reference in new issue
Block a user