mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
Shifted netmode reporting for guests
- The netmode is now reported after a guest has received it. - Minor code cleanup
This commit is contained in:
parent
c661da2995
commit
530f474673
1 changed files with 19 additions and 11 deletions
|
@ -1173,7 +1173,7 @@ void NetUpdate (void)
|
||||||
netbuffer[k++] = lowtic;
|
netbuffer[k++] = lowtic;
|
||||||
}
|
}
|
||||||
|
|
||||||
numtics = MAX(0, lowtic - realstart);
|
numtics = lowtic - realstart;
|
||||||
if (numtics > BACKUPTICS)
|
if (numtics > BACKUPTICS)
|
||||||
I_Error ("NetUpdate: Node %d missed too many tics", i);
|
I_Error ("NetUpdate: Node %d missed too many tics", i);
|
||||||
|
|
||||||
|
@ -1181,12 +1181,12 @@ void NetUpdate (void)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
resendto[i] = MAX(0, lowtic); break;
|
resendto[i] = lowtic; break;
|
||||||
case 1: resendto[i] = MAX(0, lowtic - 1); break;
|
case 1: resendto[i] = MAX(0, lowtic - 1); break;
|
||||||
case 2: resendto[i] = nettics[i]; break;
|
case 2: resendto[i] = nettics[i]; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numtics == 0 && resendOnly && !remoteresend[i] && nettics[i])
|
if (numtics <= 0 && resendOnly && !remoteresend[i] && nettics[i])
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1692,15 +1692,18 @@ void D_CheckNetGame (void)
|
||||||
|
|
||||||
consoleplayer = doomcom.consoleplayer;
|
consoleplayer = doomcom.consoleplayer;
|
||||||
|
|
||||||
v = Args->CheckValue ("-netmode");
|
if (consoleplayer == Net_Arbitrator)
|
||||||
if (v != NULL)
|
|
||||||
{
|
{
|
||||||
NetMode = atoi (v) != 0 ? NET_PacketServer : NET_PeerToPeer;
|
v = Args->CheckValue("-netmode");
|
||||||
}
|
if (v != NULL)
|
||||||
if (doomcom.numnodes > 1)
|
{
|
||||||
{
|
NetMode = atoi(v) != 0 ? NET_PacketServer : NET_PeerToPeer;
|
||||||
Printf ("Selected " TEXTCOLOR_BLUE "%s" TEXTCOLOR_NORMAL " networking mode. (%s)\n", NetMode == NET_PeerToPeer ? "peer to peer" : "packet server",
|
}
|
||||||
v != NULL ? "forced" : "auto");
|
if (doomcom.numnodes > 1)
|
||||||
|
{
|
||||||
|
Printf("Selected " TEXTCOLOR_BLUE "%s" TEXTCOLOR_NORMAL " networking mode. (%s)\n", NetMode == NET_PeerToPeer ? "peer to peer" : "packet server",
|
||||||
|
v != NULL ? "forced" : "auto");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// [RH] Setup user info
|
// [RH] Setup user info
|
||||||
|
@ -1728,6 +1731,11 @@ void D_CheckNetGame (void)
|
||||||
for (i = 0; i < doomcom.numnodes; i++)
|
for (i = 0; i < doomcom.numnodes; i++)
|
||||||
nodeingame[i] = true;
|
nodeingame[i] = true;
|
||||||
|
|
||||||
|
if (consoleplayer != Net_Arbitrator && doomcom.numnodes > 1)
|
||||||
|
{
|
||||||
|
Printf("Arbitrator selected " TEXTCOLOR_BLUE "%s" TEXTCOLOR_NORMAL " networking mode.\n", NetMode == NET_PeerToPeer ? "peer to peer" : "packet server");
|
||||||
|
}
|
||||||
|
|
||||||
Printf ("player %i of %i (%i nodes)\n",
|
Printf ("player %i of %i (%i nodes)\n",
|
||||||
consoleplayer+1, doomcom.numplayers, doomcom.numnodes);
|
consoleplayer+1, doomcom.numplayers, doomcom.numnodes);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue