cl_parse.c:

print the name of the last svc parsed when a badread happens
sv_ents.c:
	allocate enough space for the svc_nails2 nails
This commit is contained in:
Bill Currie 2002-10-06 04:30:50 +00:00
parent afad07b8e7
commit a0f49816e5
2 changed files with 5 additions and 3 deletions

View file

@ -1201,7 +1201,7 @@ CL_ParseServerMessage (void)
{
const char *s;
static dstring_t *stuffbuf;
int cmd, i, j;
int cmd = 0, i, j;
received_framecount = host_framecount;
cl.last_servermessage = realtime;
@ -1218,7 +1218,8 @@ CL_ParseServerMessage (void)
// parse the message
while (1) {
if (net_message->badread) {
Host_Error ("CL_ParseServerMessage: Bad server message");
Host_Error ("CL_ParseServerMessage: Bad server message: %s\n",
svc_strings[cmd]);
break;
}

View file

@ -131,12 +131,13 @@ SV_EmitNailUpdate (sizebuf_t *msg, qboolean recorder)
{
byte *buf; // [48 bits] xyzpy 12 12 12 4 8
int n, p, x, y, z, yaw;
int bpn = recorder ? 7 : 6; // bytes per nail
edict_t *ent;
if (!numnails)
return;
buf = SZ_GetSpace (msg, numnails * 6 + 2);
buf = SZ_GetSpace (msg, numnails * bpn + 2);
*buf++ = recorder ? svc_nails2 : svc_nails;
*buf++ = numnails;