Merge pull request #203 from Edward850/ps-disconnect

Allow players to be popped in packet-server
This commit is contained in:
rheit 2014-12-23 21:19:17 -06:00
commit 0bd331b34b

View file

@ -669,9 +669,8 @@ void PlayerIsGone (int netnode, int netconsole)
{ {
int i; int i;
if (!nodeingame[netnode]) if (nodeingame[netnode])
return; {
for (i = netnode + 1; i < doomcom.numnodes; ++i) for (i = netnode + 1; i < doomcom.numnodes; ++i)
{ {
if (nodeingame[i]) if (nodeingame[i])
@ -688,6 +687,20 @@ void PlayerIsGone (int netnode, int netconsole)
} }
nodeingame[netnode] = false; nodeingame[netnode] = false;
nodejustleft[netnode] = false; nodejustleft[netnode] = false;
}
else if (nodejustleft[netnode]) // Packet Server
{
if (netnode + 1 == doomcom.numnodes)
{
doomcom.numnodes = netnode;
}
if (playeringame[netconsole])
{
players[netconsole].playerstate = PST_GONE;
}
nodejustleft[netnode] = false;
}
else return;
if (netconsole == Net_Arbitrator) if (netconsole == Net_Arbitrator)
{ {
@ -790,7 +803,6 @@ void GetPackets (void)
else else
{ {
nodeingame[netnode] = false; nodeingame[netnode] = false;
playeringame[netconsole] = false;
nodejustleft[netnode] = true; nodejustleft[netnode] = true;
} }
continue; continue;