mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
/never/ write to the message buffers when playing a demo. This avoids the
"SZ_GetSpace: overflow" messages when playing denis (especially mvd in 1st person mode).
This commit is contained in:
parent
6917d2c1a3
commit
9145388750
4 changed files with 33 additions and 20 deletions
|
@ -190,8 +190,10 @@ Cam_Lock (int playernum)
|
|||
memcpy(cl.stats, cl.players[playernum].stats, sizeof (cl.stats));
|
||||
}
|
||||
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.netchan.message, st);
|
||||
if (!cls.demoplayback) {
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.netchan.message, st);
|
||||
}
|
||||
spec_track = playernum;
|
||||
last_lock = realtime;
|
||||
cam_forceview = true;
|
||||
|
@ -451,8 +453,10 @@ Cam_Track (usercmd_t *cmd)
|
|||
VectorCopy (player->origin, desired_position);
|
||||
if (memcmp (&desired_position, &self->origin,
|
||||
sizeof (desired_position)) != 0) {
|
||||
MSG_WriteByte (&cls.netchan.message, clc_tmove);
|
||||
MSG_WriteCoordV (&cls.netchan.message, desired_position);
|
||||
if (!cls.demoplayback) {
|
||||
MSG_WriteByte (&cls.netchan.message, clc_tmove);
|
||||
MSG_WriteCoordV (&cls.netchan.message, desired_position);
|
||||
}
|
||||
// move there locally immediately
|
||||
VectorCopy (desired_position, self->origin);
|
||||
}
|
||||
|
|
|
@ -321,9 +321,11 @@ Model_NextDownload (void)
|
|||
aliashdr_t *ahdr = Cache_Get (&cl.model_precache[i]->cache);
|
||||
Info_SetValueForKey (cls.userinfo, info_key, va ("%d", ahdr->crc),
|
||||
0);
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
SZ_Print (&cls.netchan.message, va ("setinfo %s %d", info_key,
|
||||
ahdr->crc));
|
||||
if (!cls.demoplayback) {
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
SZ_Print (&cls.netchan.message, va ("setinfo %s %d", info_key,
|
||||
ahdr->crc));
|
||||
}
|
||||
Cache_Release (&cl.model_precache[i]->cache);
|
||||
}
|
||||
}
|
||||
|
@ -342,10 +344,12 @@ Model_NextDownload (void)
|
|||
CL_NewMap (cl.model_name[1]);
|
||||
|
||||
// done with modellist, request first of static signon messages
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.netchan.message,
|
||||
va (prespawn_name, cl.servercount,
|
||||
cl.worldmodel->checksum2));
|
||||
if (!cls.demoplayback) {
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.netchan.message,
|
||||
va (prespawn_name, cl.servercount,
|
||||
cl.worldmodel->checksum2));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -381,9 +385,11 @@ Sound_NextDownload (void)
|
|||
cl_flagindex = -1;
|
||||
cl_h_playerindex = -1;
|
||||
cl_gib1index = cl_gib2index = cl_gib3index = -1;
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.netchan.message,
|
||||
va (modellist_name, cl.servercount, 0));
|
||||
if (!cls.demoplayback) {
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.netchan.message,
|
||||
va (modellist_name, cl.servercount, 0));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -700,9 +706,11 @@ CL_ParseServerData (void)
|
|||
|
||||
// ask for the sound list next
|
||||
memset (cl.sound_name, 0, sizeof (cl.sound_name));
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.netchan.message,
|
||||
va (soundlist_name, cl.servercount, 0));
|
||||
if (!cls.demoplayback) {
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.netchan.message,
|
||||
va (soundlist_name, cl.servercount, 0));
|
||||
}
|
||||
|
||||
// now waiting for downloads, etc
|
||||
CL_SetState (ca_onserver);
|
||||
|
@ -749,7 +757,7 @@ CL_ParseSoundlist (void)
|
|||
|
||||
n = MSG_ReadByte (net_message);
|
||||
|
||||
if (n) {
|
||||
if (n && !cls.demoplayback) {
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.netchan.message,
|
||||
va (soundlist_name, cl.servercount, n));
|
||||
|
|
|
@ -79,7 +79,7 @@ CL_NetStats (void)
|
|||
x = hudswap ? vid.width - 104 : 0;
|
||||
y = vid.height - sb_lines - 16;
|
||||
// request new ping times every two seconds
|
||||
if (realtime - cl.last_ping_request > 2) {
|
||||
if (!cls.demoplayback && realtime - cl.last_ping_request > 2) {
|
||||
cl.last_ping_request = realtime;
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
SZ_Print (&cls.netchan.message, "pings");
|
||||
|
|
|
@ -94,7 +94,8 @@ Skin_NextDownload (void)
|
|||
sc->skin = NULL;
|
||||
}
|
||||
|
||||
if (cls.state != ca_active) { // get next signon phase
|
||||
if (cls.state != ca_active && !cls.demoplayback) {
|
||||
// get next signon phase
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.netchan.message, va ("begin %i",
|
||||
cl.servercount));
|
||||
|
|
Loading…
Reference in a new issue