support as many packet entities in demos as qwex does (ie, 196). Makes me

wonder if I should make the server support sending 196 packet entities to
qf clients.
This commit is contained in:
Bill Currie 2002-10-17 16:03:18 +00:00
parent 4da662eb47
commit ef33b9754b
5 changed files with 14 additions and 12 deletions

View file

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

View file

@ -26,8 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "server.h"
#define MAX_DEMO_PACKET_ENTITIES 64
typedef struct {
byte *data;
int start, end, last;

View file

@ -337,9 +337,9 @@ CL_ParsePacketEntities (qboolean delta)
if (!word) { // copy rest of ents from old packet
while (oldindex < oldp->num_entities) {
if (newindex >= MAX_PACKET_ENTITIES)
if (newindex >= MAX_DEMO_PACKET_ENTITIES)
Host_Error ("CL_ParsePacketEntities: newindex == "
"MAX_PACKET_ENTITIES");
"MAX_DEMO_PACKET_ENTITIES");
newp->entities[newindex] = oldp->entities[oldindex];
newindex++;
oldindex++;
@ -357,9 +357,9 @@ CL_ParsePacketEntities (qboolean delta)
return;
}
// copy one of the old entities over to the new packet unchanged
if (newindex >= MAX_PACKET_ENTITIES)
if (newindex >= MAX_DEMO_PACKET_ENTITIES)
Host_Error ("CL_ParsePacketEntities: newindex == "
"MAX_PACKET_ENTITIES");
"MAX_DEMO_PACKET_ENTITIES");
newp->entities[newindex] = oldp->entities[oldindex];
newindex++;
oldindex++;
@ -378,9 +378,9 @@ CL_ParsePacketEntities (qboolean delta)
continue;
}
if (newindex >= MAX_PACKET_ENTITIES)
if (newindex >= MAX_DEMO_PACKET_ENTITIES)
Host_Error ("CL_ParsePacketEntities: newindex == "
"MAX_PACKET_ENTITIES");
"MAX_DEMO_PACKET_ENTITIES");
CL_ParseDelta (&cl_baselines[newnum], &newp->entities[newindex],
word);
newindex++;

View file

@ -184,7 +184,7 @@ static int cl_usleep_cache;
client_static_t cls;
client_state_t cl;
entity_state_t cl_entities[UPDATE_BACKUP][MAX_PACKET_ENTITIES];
entity_state_t cl_entities[UPDATE_BACKUP][MAX_DEMO_PACKET_ENTITIES];
entity_state_t cl_baselines[MAX_EDICTS];
efrag_t cl_efrags[MAX_EFRAGS];

View file

@ -615,6 +615,7 @@ SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg, qboolean recorder)
{
byte *pvs;
int e, i, num_edicts, mpe_moaned = 0;
int max_packet_entities = MAX_PACKET_ENTITIES;
vec3_t org;
client_frame_t *frame;
edict_t *clent, *ent;
@ -633,6 +634,8 @@ SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg, qboolean recorder)
} else {
client_t *cl;
max_packet_entities = MAX_DEMO_PACKET_ENTITIES;
for (i=0, cl = svs.clients; i<MAX_CLIENTS; i++, cl++) {
if (cl->state != cs_spawned)
continue;
@ -686,9 +689,9 @@ SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg, qboolean recorder)
continue; // added to the special update list
// add to the packetentities
if (pack->num_entities == MAX_PACKET_ENTITIES) {
if (pack->num_entities == max_packet_entities) {
if (!mpe_moaned) {
Con_DPrintf ("hit MAX_PACKET_ENTITIES for client %d\n",
Con_DPrintf ("hit max_packet_entities for client %d\n",
client->userid);
mpe_moaned = 1;
}