From 84468fd0509e77afdc9030dd4ec9a397b79e22fa Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 14 Apr 2006 15:25:42 +0000 Subject: Add ability to play using the Vanilla player sync code Subversion-branch: /trunk/chocolate-doom Subversion-revision: 470 --- src/net_client.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/net_client.c') diff --git a/src/net_client.c b/src/net_client.c index 026a9ee1..7aa26f86 100644 --- a/src/net_client.c +++ b/src/net_client.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: net_client.c 462 2006-04-06 19:31:45Z fraggle $ +// $Id: net_client.c 470 2006-04-14 15:25:42Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -269,6 +269,11 @@ static net_server_recv_t recvwindow[BACKUPTICS]; static fixed_t average_latency; +// Use new-style ticcmd sync (fixes indigo lag) + +boolean net_cl_new_sync = true; + + #define NET_CL_ExpandTicNum(b) NET_ExpandTicNum(recvwindow_start, (b)) // Called when a player leaves the game @@ -466,6 +471,11 @@ void NET_CL_StartGame(void) settings.gameversion = gameversion; settings.nomonsters = nomonsters; + if (M_CheckParm("-oldsync") > 0) + settings.new_sync = 0; + else + settings.new_sync = 1; + i = M_CheckParm("-extratics"); if (i > 0) @@ -663,6 +673,12 @@ static void NET_CL_ParseGameStart(net_packet_t *packet) startskill = settings.skill; lowres_turn = settings.lowres_turn; nomonsters = settings.nomonsters; + net_cl_new_sync = settings.new_sync != 0; + + if (net_cl_new_sync == false) + { + printf("Syncing netgames like Vanilla Doom.\n"); + } memset(recvwindow, 0, sizeof(recvwindow)); recvwindow_start = 0; -- cgit v1.2.3