mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
Allow players to be popped in packet-server
This commit is contained in:
parent
80bc95d3bc
commit
b24f173d03
1 changed files with 28 additions and 16 deletions
|
@ -669,25 +669,38 @@ 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)
|
||||||
|
{
|
||||||
|
if (nodeingame[i])
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (i == doomcom.numnodes)
|
||||||
|
{
|
||||||
|
doomcom.numnodes = netnode;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = netnode + 1; i < doomcom.numnodes; ++i)
|
if (playeringame[netconsole])
|
||||||
{
|
{
|
||||||
if (nodeingame[i])
|
players[netconsole].playerstate = PST_GONE;
|
||||||
break;
|
}
|
||||||
|
nodeingame[netnode] = false;
|
||||||
|
nodejustleft[netnode] = false;
|
||||||
}
|
}
|
||||||
if (i == doomcom.numnodes)
|
else if (nodejustleft[netnode]) // Packet Server
|
||||||
{
|
{
|
||||||
doomcom.numnodes = netnode;
|
if (netnode + 1 == doomcom.numnodes)
|
||||||
|
{
|
||||||
|
doomcom.numnodes = netnode;
|
||||||
|
}
|
||||||
|
if (playeringame[netconsole])
|
||||||
|
{
|
||||||
|
players[netconsole].playerstate = PST_GONE;
|
||||||
|
}
|
||||||
|
nodejustleft[netnode] = false;
|
||||||
}
|
}
|
||||||
|
else return;
|
||||||
if (playeringame[netconsole])
|
|
||||||
{
|
|
||||||
players[netconsole].playerstate = PST_GONE;
|
|
||||||
}
|
|
||||||
nodeingame[netnode] = false;
|
|
||||||
nodejustleft[netnode] = false;
|
|
||||||
|
|
||||||
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;
|
||||||
|
|
Loading…
Reference in a new issue