From 0c1fde81ad9097421040cfa5445ed987c5395e7a Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Sun, 5 Oct 2014 18:32:32 +1300 Subject: [PATCH] Remove PacketServer auto select PacketServer has the tendency to amplify netgame latency times, so it really shouldn't be auto selected. Added a notice in case it's used. --- src/d_net.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/d_net.cpp b/src/d_net.cpp index 0e057369c..f15bdf45d 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -697,7 +697,7 @@ void PlayerIsGone (int netnode, int netconsole) // Pick a new network arbitrator for (int i = 0; i < MAXPLAYERS; i++) { - if (playeringame[i] && !players[i].isbot) + if (i != netconsole && playeringame[i] && !players[i].isbot) { Net_Arbitrator = i; players[i].settings_controller = true; @@ -1725,10 +1725,19 @@ void D_CheckNetGame (void) resendto[i] = 0; // which tic to start sending } + // Packet server has proven to be rather slow over the internet. Print a warning about it. + v = Args->CheckValue("-netmode"); + if (v != NULL && (atoi(v) != 0)) + { + Printf(TEXTCOLOR_YELLOW "Notice: Using PacketServer (netmode 1) over the internet is unreliable and is prone to running too slow on some internet configurations." + "\nIf the game is running well below excpected speeds, use netmode 0 (P2P) instead.\n"); + } + // I_InitNetwork sets doomcom and netgame if (I_InitNetwork ()) { - NetMode = NET_PacketServer; + // For now, stop auto selecting PacketServer, as it's more likely to cause confusion. + //NetMode = NET_PacketServer; } if (doomcom.id != DOOMCOM_ID) {