From 632320e1fd17663ef7b55c52de3df8c4849404e9 Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 22 Nov 2008 02:59:25 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@1145 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 09eb660af..f55b88846 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -990,6 +990,12 @@ void getpackets(void) initprintf("Player %d has version %d, expecting %d\n",packbuf[3],BYTEVERSION); G_GameExit("You cannot play Duke with different versions!"); } + if (packbuf[4] > g_numSyncBytes) + { + initprintf("Sync debugging enabled\n"); + g_numSyncBytes = packbuf[4]; + } + break; case PACKET_TYPE_PLAYER_OPTIONS: @@ -9577,6 +9583,12 @@ static void G_CheckCommandLine(int argc, const char **argv) i++; continue; } + if (!Bstrcasecmp(c+1,"debugsync")) + { + g_numSyncBytes = 6; + i++; + continue; + } #ifndef RANCID_NETWORKING if (!Bstrcasecmp(c+1,"rmnet")) { @@ -10629,10 +10641,11 @@ static void Net_SendVersion(void) buf[1] = myconnectindex; buf[2] = (char)atoi(s_builddate); buf[3] = BYTEVERSION; + buf[4] = g_numSyncBytes; TRAVERSE_CONNECT(i) { - if (i != myconnectindex) sendpacket(i,&buf[0],4); + if (i != myconnectindex) sendpacket(i,&buf[0],5); if ((!g_networkBroadcastMode) && (myconnectindex != connecthead)) break; //slaves in M/S mode only send to master } waitforeverybody();