Skip to content

Commit 7c13a36

Browse files
committed
PROTOCOL: Align MVD/QTV with gameplay protocol.
* PEXT_SPAWNSTATIC2 - Delta spawns for extended attributes * svc_fte_spawnstatic2 * svc_fte_spawnbaseline2 * PEXT_ENTITYDBL - Up to 1024 entities * PEXT_ENTITYDBL2 - Up to 2048 entities * PEXT_MODELDBL - Up to uint16 model indices * svc_fte_modellistshort * PEXT_TRANS - 1 byte alpha field on entities * PEXT_COLOURMOD - 3 byte colourmod on entities * PEXT2_VOICECHAT
1 parent 34d62f6 commit 7c13a36

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

src/sv_demo.c

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,31 @@ void SV_MVD_SendInitialGamestate(mvddest_t* dest)
12111211

12121212
MSG_WriteByte(&buf, svc_serverdata);
12131213

1214+
#ifdef FTE_PEXT_256PACKETENTITIES
1215+
demo.recorder.fteprotocolextensions |= FTE_PEXT_256PACKETENTITIES;
1216+
#endif
1217+
#ifdef FTE_PEXT_MODELDBL
1218+
demo.recorder.fteprotocolextensions |= FTE_PEXT_MODELDBL;
1219+
#endif
1220+
#ifdef FTE_PEXT_ENTITYDBL
1221+
demo.recorder.fteprotocolextensions |= FTE_PEXT_ENTITYDBL;
1222+
#endif
1223+
#ifdef FTE_PEXT_ENTITYDBL2
1224+
demo.recorder.fteprotocolextensions |= FTE_PEXT_ENTITYDBL2;
1225+
#endif
1226+
#ifdef FTE_PEXT_SPAWNSTATIC2
1227+
demo.recorder.fteprotocolextensions |= FTE_PEXT_SPAWNSTATIC2;
1228+
#endif
1229+
#ifdef FTE_PEXT_TRANS
1230+
demo.recorder.fteprotocolextensions |= FTE_PEXT_TRANS;
1231+
#endif
1232+
#ifdef FTE_PEXT_COLOURMOD
1233+
demo.recorder.fteprotocolextensions |= FTE_PEXT_COLOURMOD;
1234+
#endif
1235+
#ifdef FTE_PEXT2_VOICECHAT
1236+
demo.recorder.fteprotocolextensions2 |= FTE_PEXT2_VOICECHAT;
1237+
#endif
1238+
12141239
#ifdef FTE_PEXT_FLOATCOORDS
12151240
//fix up extensions to match sv_bigcoords correctly. sorry for old clients not working.
12161241
if (msg_coordsize == 4)
@@ -1328,8 +1353,15 @@ void SV_MVD_SendInitialGamestate(mvddest_t* dest)
13281353
MSG_WriteByte (&buf, n);
13291354
SV_WriteRecordMVDMessage (&buf);
13301355
SZ_Clear (&buf);
1331-
MSG_WriteByte (&buf, svc_modellist);
1332-
MSG_WriteByte (&buf, n + 1);
1356+
if (n + 1 > 0xff)
1357+
{
1358+
MSG_WriteByte (&buf, svc_fte_modellistshort);
1359+
MSG_WriteShort (&buf, n + 1);
1360+
} else
1361+
{
1362+
MSG_WriteByte (&buf, svc_modellist);
1363+
MSG_WriteByte (&buf, n + 1);
1364+
}
13331365
}
13341366
n++;
13351367
s = sv.model_precache[n+1];

0 commit comments

Comments
 (0)