summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2006-04-06 19:31:45 +0000
committerSimon Howard2006-04-06 19:31:45 +0000
commit938dee148de348987dc64c70e48edc8914b0f3ad (patch)
tree358b78c77ca471fc9b4d30657359b0fec5b93033 /src
parent2d45e6c02cfe002ff4c5a3aa6a360f918ee54e61 (diff)
downloadchocolate-doom-938dee148de348987dc64c70e48edc8914b0f3ad.tar.gz
chocolate-doom-938dee148de348987dc64c70e48edc8914b0f3ad.tar.bz2
chocolate-doom-938dee148de348987dc64c70e48edc8914b0f3ad.zip
Use BACKUPTICS everywhere. Remove NET_TICCMD_QUEUE_SIZE
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 462
Diffstat (limited to 'src')
-rw-r--r--src/net_client.c14
-rw-r--r--src/net_defs.h6
2 files changed, 8 insertions, 12 deletions
diff --git a/src/net_client.c b/src/net_client.c
index 95a3f81b..026a9ee1 100644
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: net_client.c 461 2006-04-06 17:53:43Z fraggle $
+// $Id: net_client.c 462 2006-04-06 19:31:45Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -257,7 +257,7 @@ static ticcmd_t last_ticcmd;
// Buffer of ticcmd diffs being sent to the server
-static net_server_send_t send_queue[NET_TICCMD_QUEUE_SIZE];
+static net_server_send_t send_queue[BACKUPTICS];
// Receive window
@@ -324,11 +324,11 @@ static void NET_CL_ExpandFullTiccmd(net_full_ticcmd_t *cmd, int seq)
// Update average_latency
- if (seq == send_queue[seq % NET_TICCMD_QUEUE_SIZE].seq)
+ if (seq == send_queue[seq % BACKUPTICS].seq)
{
- latency = I_GetTimeMS() - send_queue[seq % NET_TICCMD_QUEUE_SIZE].time;
+ latency = I_GetTimeMS() - send_queue[seq % BACKUPTICS].time;
}
- else if (seq > send_queue[seq % NET_TICCMD_QUEUE_SIZE].seq)
+ else if (seq > send_queue[seq % BACKUPTICS].seq)
{
// We have received the ticcmd from the server before we have
// even sent ours
@@ -517,7 +517,7 @@ static void NET_CL_SendTics(int start, int end)
{
net_server_send_t *sendobj;
- sendobj = &send_queue[i % NET_TICCMD_QUEUE_SIZE];
+ sendobj = &send_queue[i % BACKUPTICS];
NET_WriteInt16(packet, average_latency / FRACUNIT);
@@ -547,7 +547,7 @@ void NET_CL_SendTiccmd(ticcmd_t *ticcmd, int maketic)
// Store in the send queue
- sendobj = &send_queue[maketic % NET_TICCMD_QUEUE_SIZE];
+ sendobj = &send_queue[maketic % BACKUPTICS];
sendobj->active = true;
sendobj->seq = maketic;
sendobj->time = I_GetTimeMS();
diff --git a/src/net_defs.h b/src/net_defs.h
index ba5b769c..e9db14fd 100644
--- a/src/net_defs.h
+++ b/src/net_defs.h
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: net_defs.h 410 2006-03-07 12:46:52Z fraggle $
+// $Id: net_defs.h 462 2006-04-06 19:31:45Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -139,10 +139,6 @@ struct _net_addr_s
void *handle;
};
-// number of ticcmds to store in send queues
-
-#define NET_TICCMD_QUEUE_SIZE 64
-
// magic number sent when connecting to check this is a valid client
#define NET_MAGIC_NUMBER 3436803284U