back out the large packet/entity related patches. they've provent to be troublesome and it seems FTE has a better solution.

This commit is contained in:
Bill Currie 2007-05-07 14:58:53 +00:00 committed by Jeff Teunissen
parent 097be5a093
commit 839c00b97b
12 changed files with 12 additions and 45 deletions

View file

@ -34,12 +34,8 @@
#include "QF/qdefs.h"
#include "QF/sizebuf.h"
//#define MAX_MSGLEN 1450 // max length of a reliable message
//#define MAX_DATAGRAM 1450 // max length of unreliable message
#define MAX_MSGLEN 2900
#define MAX_DATAGRAM 2900
#define MAX_OLD_MSGLEN 1450
#define MAX_OLD_DATAGRAM 1450
#define MAX_MSGLEN 1450 // max length of a reliable message
#define MAX_DATAGRAM 1450 // max length of unreliable message
#define PORT_ANY -1

View file

@ -32,8 +32,6 @@
#ifndef __qw_msg_backbuf_h
#define __qw_msg_backbuf_h
#include "netchan.h"
#define MAX_BACK_BUFFERS 8
typedef struct backbuf_s {
@ -42,7 +40,6 @@ typedef struct backbuf_s {
int head_backbuf;
int backbuf_size[MAX_BACK_BUFFERS];
byte backbuf_data[MAX_BACK_BUFFERS][MAX_MSGLEN];
size_t max_msglen;
struct netchan_s *netchan;
const char *name;
} backbuf_t;

View file

@ -322,7 +322,6 @@ typedef struct {
} entity_state_t;
#define MAX_PACKET_ENTITIES 64 // doesn't count nails
#define MAX_EXT_PACKET_ENTITIES 128 // doesn't count nails
#define MAX_DEMO_PACKET_ENTITIES 196 // doesn't count nails
typedef struct {
int num_entities;

View file

@ -53,11 +53,9 @@ PushBackbuf (backbuf_t *rel)
Con_DPrintf ("backbuffering %d %s\n", rel->num_backbuf, rel->name);
tail_backbuf = (rel->head_backbuf + rel->num_backbuf) % MAX_BACK_BUFFERS;
memset (&rel->backbuf, 0, sizeof (rel->backbuf));
if (rel->max_msglen > sizeof (rel->backbuf_data[tail_backbuf]))
rel->max_msglen = sizeof (rel->backbuf_data[tail_backbuf]);
rel->backbuf.allowoverflow = true;
rel->backbuf.data = rel->backbuf_data[tail_backbuf];
rel->backbuf.maxsize = rel->max_msglen;
rel->backbuf.maxsize = sizeof (rel->backbuf_data[tail_backbuf]);
rel->backbuf_size[tail_backbuf] = 0;
rel->num_backbuf++;
}

View file

@ -53,7 +53,7 @@ typedef struct client_s {
byte datagram_buf[MAX_DATAGRAM];
qboolean send_message;
frame_t frames[UPDATE_BACKUP];
entity_state_t packet_entities[UPDATE_BACKUP][MAX_EXT_PACKET_ENTITIES];
entity_state_t packet_entities[UPDATE_BACKUP][MAX_PACKET_ENTITIES];
int delta_sequence;

View file

@ -1020,7 +1020,7 @@ write_entities (client_t *client, sizebuf_t *msg)
// continue; // added to the special update list
// add to the packetentities
if (pack->num_entities == MAX_EXT_PACKET_ENTITIES) {
if (pack->num_entities == MAX_PACKET_ENTITIES) {
qtv_printf ("mpe overflow\n");
continue; // all full
}
@ -1148,7 +1148,6 @@ client_connect (connection_t *con, void *object)
cl->name = Info_ValueForKey (userinfo, "name");
cl->backbuf.name = cl->name;
cl->backbuf.netchan = &cl->netchan;
cl->backbuf.max_msglen = MAX_MSGLEN;
cl->con = con;
con->object = cl;
con->handler = client_handler;

View file

@ -246,8 +246,6 @@ typedef struct client_s {
double last_check;
double cuff_time;
float stdver;
int max_packet_ents; // either MAX_PACKET_ENTITIES or MAX_EXT_PACKET_ENTITIES
} client_t;
// a client can leave the server in one of four ways:

View file

@ -665,9 +665,7 @@ CL_AddQFInfoKeys (void)
// i * irc
// p pogo stick control
// t team messages
// e large entity/packet maximum. (128)
// u large packet support. (2x normal)
static const char *cap = "pteu"
static const char *cap = "pt"
#ifdef HAVE_ZLIB
"z"
#endif

View file

@ -768,7 +768,7 @@ SV_WriteEntitiesToClient (delta_t *delta, sizebuf_t *msg)
packet_entities_t *pack;
if (delta->client) {
max_packet_entities = delta->client->max_packet_ents;
max_packet_entities = MAX_PACKET_ENTITIES;
stdver = delta->client->stdver;
}

View file

@ -102,7 +102,7 @@ cbuf_t *sv_cbuf;
cbuf_args_t *sv_args;
client_t *host_client; // current client
entity_state_t cl_entities[MAX_CLIENTS][UPDATE_BACKUP+1][MAX_EXT_PACKET_ENTITIES]; // client entities
entity_state_t cl_entities[MAX_CLIENTS][UPDATE_BACKUP+1][MAX_PACKET_ENTITIES]; // client entities
double sv_frametime;
double realtime; // without any filtering or bounding
@ -768,7 +768,6 @@ SVC_DirectConnect (void)
const char *s;
client_t *cl, *newcl;
int challenge, qport, version, i, qtv = 0;
int large_ent, large_dg;
netadr_t adr;
qboolean spectator;
client_frame_t *frames;
@ -909,24 +908,17 @@ SVC_DirectConnect (void)
Netchan_OutOfBandPrint (adr, "%c", S2C_CONNECTION);
large_ent = strchr(Info_ValueForKey (userinfo, "*cap"), 'e') != 0;
large_dg = strchr(Info_ValueForKey (userinfo, "*cap"), 'u') != 0;
Netchan_Setup (&newcl->netchan, adr, qport, NC_READ_QPORT);
newcl->backbuf.netchan = &newcl->netchan;
newcl->backbuf.name = newcl->name;
newcl->backbuf.max_msglen = large_dg ? MAX_MSGLEN : MAX_OLD_MSGLEN;
newcl->state = cs_connected;
newcl->prespawned = false;
newcl->spawned = false;
newcl->max_packet_ents = large_ent ? MAX_EXT_PACKET_ENTITIES
: MAX_PACKET_ENTITIES;
newcl->datagram.allowoverflow = true;
newcl->datagram.data = newcl->datagram_buf;
newcl->datagram.maxsize = large_dg ? MAX_DATAGRAM : MAX_OLD_DATAGRAM;
newcl->datagram.maxsize = sizeof (newcl->datagram_buf);
// spectator mode can ONLY be set at join time
newcl->spectator = spectator;
@ -953,16 +945,6 @@ SVC_DirectConnect (void)
NET_AdrToString (adr));
newcl->sendinfo = true;
if(newcl->max_packet_ents == MAX_EXT_PACKET_ENTITIES) {
SV_Printf ("Client %s (%s) supports large entity counts\n", newcl->name,
NET_AdrToString (adr));
}
if(newcl->datagram.maxsize == MAX_DATAGRAM) {
SV_Printf ("Client %s (%s) supports large datagram sizes\n", newcl->name,
NET_AdrToString (adr));
}
// QuakeForge stuff.
newcl->msecs = 0;
newcl->msec_cheating = 0;

View file

@ -643,7 +643,6 @@ SV_SendClientDatagram (client_t *client)
SV_Printf ("WARNING: msg overflowed for %s\n", client->name);
SZ_Clear (&msg);
}
// send the datagram
Netchan_Transmit (&client->netchan, msg.cursize, msg.data);

View file

@ -594,8 +594,9 @@ opt_initializer
var_initializer
: '=' expr // don't bother folding twice
{
if (current_scope->type == sc_local
|| current_scope->type == sc_params) {
if (current_scope->type == sc_params) {
notice (0, "whee");
} else if (current_scope->type == sc_local) {
expr_t *expr = assign_expr (new_def_expr ($<def>0), $2);
expr = fold_constants (expr);
append_expr (local_expr, expr);