shithub: choc

Download patch

ref: 859b503bae0c66a843ba83d89224b6cddc28e132
parent: 49bb2324f20de0414e672ea42f52d828b7246014
author: Simon Howard <[email protected]>
date: Wed Mar 1 19:57:25 EST 2006

Remove redundant code, shut up warnings

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 405

--- a/src/d_net.c
+++ b/src/d_net.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: d_net.c 403 2006-03-02 00:03:48Z fraggle $
+// $Id: d_net.c 405 2006-03-02 00:57:25Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -117,7 +117,7 @@
 //-----------------------------------------------------------------------------
 
 
-static const char rcsid[] = "$Id: d_net.c 403 2006-03-02 00:03:48Z fraggle $";
+static const char rcsid[] = "$Id: d_net.c 405 2006-03-02 00:57:25Z fraggle $";
 
 
 #include "d_main.h"
@@ -187,8 +187,7 @@
 {
     int             nowtime;
     int             newtics;
-    int				i,j;
-    int				realstart;
+    int				i;
     int				gameticdiv;
     
     // Temporary hack - hook new client/server code into Doom
@@ -344,8 +343,6 @@
 //
 void D_QuitNetGame (void)
 {
-    int             i, j;
-	
     if (debugfile)
 	fclose (debugfile);
 
@@ -391,15 +388,11 @@
     int		i;
     int		lowtic;
     int		entertic;
-    static int	oldentertics;
-    int		realtics;
     int		availabletics;
     int		counts;
     
     // get real tics		
     entertic = I_GetTime ()/ticdup;
-    realtics = entertic - oldentertics;
-    oldentertics = entertic;
     
     // get available tics
     NetUpdate ();
@@ -409,12 +402,6 @@
     availabletics = lowtic - gametic/ticdup;
     
     // decide how many tics to run
-    if (realtics < availabletics-1)
-	counts = realtics+1;
-    else if (realtics < availabletics)
-	counts = realtics;
-    else
-	counts = availabletics;
     
     counts = availabletics;
 
@@ -421,11 +408,6 @@
     if (counts < 1)
 	counts = 1;
 		
-    if (debugfile)
-	fprintf (debugfile,
-		 "=======real: %i  avail: %i  game: %i\n",
-		 realtics, availabletics,counts);
-	
     // wait for new tics if needed
     while (lowtic < gametic/ticdup + counts)	
     {
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: g_game.c 402 2006-03-01 23:36:44Z fraggle $
+// $Id: g_game.c 405 2006-03-02 00:57:25Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -134,7 +134,7 @@
 
 
 static const char
-rcsid[] = "$Id: g_game.c 402 2006-03-01 23:36:44Z fraggle $";
+rcsid[] = "$Id: g_game.c 405 2006-03-02 00:57:25Z fraggle $";
 
 #include <string.h>
 #include <stdlib.h>
@@ -1446,7 +1446,6 @@
 { 
     char	name[100]; 
     char*	description; 
-    unsigned long length;
 	
     strcpy(name, P_SaveGameFile(savegameslot));
 
--- a/src/net_client.h
+++ b/src/net_client.h
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: net_client.h 284 2006-01-12 02:11:52Z fraggle $
+// $Id: net_client.h 405 2006-03-02 00:57:25Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -69,6 +69,7 @@
 
 #include "doomdef.h"
 #include "doomtype.h"
+#include "d_ticcmd.h"
 #include "net_defs.h"
 
 #define MAXPLAYERNAME 30
@@ -78,6 +79,7 @@
 void NET_CL_Run(void);
 void NET_CL_Init(void);
 void NET_CL_StartGame();
+void NET_CL_SendTiccmd(ticcmd_t *ticcmd, int maketic);
 void NET_Init(void);
 
 extern boolean net_client_connected;