From 46636fd08ea64c6b6d495097e54c928e1a2d39e9 Mon Sep 17 00:00:00 2001 From: Shpoike Date: Wed, 22 Jan 2025 05:19:48 +0000 Subject: [PATCH] Demolist wasn't listing .qwd for some reason. --- engine/client/cl_demo.c | 4 ++-- engine/client/m_single.c | 5 +++-- engine/server/sv_mvd.c | 10 +++++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/engine/client/cl_demo.c b/engine/client/cl_demo.c index bf301af34..c88dd5f1b 100644 --- a/engine/client/cl_demo.c +++ b/engine/client/cl_demo.c @@ -1997,7 +1997,7 @@ void CL_Record_f (void) n = 0; s = cl.sound_name[n+1]; - while (*s) + while (s && *s) { MSG_WriteString (&buf, s); if (buf.cursize > buf.maxsize/2 && (n&0xff)) @@ -2035,7 +2035,7 @@ void CL_Record_f (void) n = 0; s = cl.model_name[n+1]; - while (*s) + while (s && *s) { MSG_WriteString (&buf, s); if (buf.cursize > buf.maxsize/2 && (n&0xff)) diff --git a/engine/client/m_single.c b/engine/client/m_single.c index bb4246504..d41a009c9 100644 --- a/engine/client/m_single.c +++ b/engine/client/m_single.c @@ -1183,7 +1183,8 @@ void M_Menu_Demos_f (void) { char *demoexts[] = { ".mvd", ".mvd.gz", - ".qwz", ".qwz.gz", + ".qwd", ".qwd.gz", + //".qwz", ".qwz.gz", #ifdef NQPROT ".dem", ".dem.gz", #endif @@ -1191,7 +1192,7 @@ void M_Menu_Demos_f (void) ".dm2", ".dm2.gz" #endif //there are also qizmo demos (.qwz) out there... - //we don't support them, but if we were to ask quizmo to decode them for us, we could do. + //we don't support them, but if we were to ask qizmo to decode them for us, we could do. }; char *archiveexts[] = { #ifdef PACKAGE_PK3 diff --git a/engine/server/sv_mvd.c b/engine/server/sv_mvd.c index 0f4402e98..0064b069f 100644 --- a/engine/server/sv_mvd.c +++ b/engine/server/sv_mvd.c @@ -715,9 +715,11 @@ static dir_t *Sys_listdemos (char *path, int ispublic, qboolean usesorting) { const char *exts[] = { ".mvd", ".mvd.gz", - ".qwz", ".qwz.gz", + ".qwd", ".qwd.gz", + ".qwz", ".qwz.gz", //our client doesn't support them, but others do any they still might want to download them if there's any there... #ifdef NQPROT ".dem", ".dem.gz", + //don't bother with .dz, that's more of an archive format (and should at least show up with .dem files) #endif #if defined(Q2SERVER) || defined(Q2CLIENT) ".dm2", ".dm2.gz" @@ -1626,7 +1628,9 @@ qboolean SV_MVD_Record (mvddest_t *dest) demo.recorder.fteprotocolextensions = /*PEXT_CHUNKEDDOWNLOADS|*/PEXT_256PACKETENTITIES|/*PEXT_FLOATCOORDS|*/PEXT_MODELDBL|PEXT_ENTITYDBL|PEXT_ENTITYDBL2|PEXT_SPAWNSTATIC2; // demo.recorder.fteprotocolextensions |= PEXT_HLBSP; /*ezquake DOES have this, but it is pointless and should have been in some feature mask rather than protocol extensions*/ // demo.recorder.fteprotocolextensions |= PEXT_ACCURATETIMINGS; /*ezquake does not support this any more. pointless in an mvd anyway*/ - demo.recorder.fteprotocolextensions |= PEXT_TRANS; /*ezquake has no support for .alpha*/ + demo.recorder.fteprotocolextensions |= PEXT_TRANS; /*ezquake's support for alpha is buggyaf on players, but mvd streams change svc_playerinfo which sidesteps the issue*/ +// demo.recorder.fteprotocolextensions |= PEXT_COLOURMOD; /*nano is working on adding this*/ +// demo.recorder.fteprotocolextensions |= PEXT_DPFLAGS; /*nano is working on adding this*/ demo.recorder.fteprotocolextensions2 = PEXT2_VOICECHAT; demo.recorder.zquake_extensions = Z_EXT_PM_TYPE | Z_EXT_PM_TYPE_NEW | Z_EXT_VIEWHEIGHT | Z_EXT_SERVERTIME | Z_EXT_PITCHLIMITS | Z_EXT_JOIN_OBSERVE | Z_EXT_VWEP; } @@ -1637,7 +1641,7 @@ qboolean SV_MVD_Record (mvddest_t *dest) #ifdef PEXT_VIEW2 demo.recorder.fteprotocolextensions |= PEXT_VIEW2; #endif - demo.recorder.fteprotocolextensions2 = PEXT2_VOICECHAT | PEXT2_SETANGLEDELTA | /*PEXT2_PRYDONCURSOR |*/ (pext_replacementdeltas.ival?PEXT2_REPLACEMENTDELTAS:0) | PEXT2_PREDINFO | PEXT2_NEWSIZEENCODING; + demo.recorder.fteprotocolextensions2 = PEXT2_VOICECHAT | PEXT2_SETANGLEDELTA | /*PEXT2_PRYDONCURSOR |*/ (pext_replacementdeltas.ival?PEXT2_REPLACEMENTDELTAS|PEXT2_PREDINFO|PEXT2_NEWSIZEENCODING:0); /*enable these, because we might as well (stat ones are always useful)*/ demo.recorder.zquake_extensions = Z_EXT_PM_TYPE | Z_EXT_PM_TYPE_NEW | Z_EXT_VIEWHEIGHT | Z_EXT_SERVERTIME | Z_EXT_PITCHLIMITS | Z_EXT_JOIN_OBSERVE | Z_EXT_VWEP;