Skip to content

Commit b42be20

Browse files
committed
Add support for PEXT_MODELDBL.
1 parent 9fe092a commit b42be20

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

src/netmsg_parser.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,9 @@ static void NetMsg_Parser_ParseEntityDelta(unsigned int bits, unsigned int moreb
546546
{
547547
if (bits & U_MODEL)
548548
MSG_ReadByte();
549+
else if (morebits & U_FTE_MODELDBL)
550+
MSG_ReadShort();
551+
549552
if (bits & U_FRAME)
550553
MSG_ReadByte();
551554
if (bits & U_COLORMAP)
@@ -1288,10 +1291,10 @@ static void NetMsg_Parser_Parse_svc_chokecount(void)
12881291
MSG_ReadByte();
12891292
}
12901293

1291-
static void NetMsg_Parser_Parse_svc_modellist(void)
1294+
static void NetMsg_Parser_Parse_svc_modellist(qbool extended)
12921295
{
12931296
char *str;
1294-
int model_count = MSG_ReadByte();
1297+
int model_count = extended ? MSG_ReadShort() : MSG_ReadByte();
12951298

12961299
while (true)
12971300
{
@@ -1592,7 +1595,12 @@ qbool NetMsg_Parser_StartParse(mvd_info_t *mvd)
15921595
}
15931596
case svc_modellist :
15941597
{
1595-
NetMsg_Parser_Parse_svc_modellist();
1598+
NetMsg_Parser_Parse_svc_modellist(false);
1599+
break;
1600+
}
1601+
case svc_fte_modellistshort :
1602+
{
1603+
NetMsg_Parser_Parse_svc_modellist(true);
15961604
break;
15971605
}
15981606
case svc_soundlist :

src/qw_protocol.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ char *svc_strings[] =
7878
"NEW PROTOCOL",
7979
"NEW PROTOCOL",
8080
"NEW PROTOCOL",
81-
"NEW PROTOCOL",
81+
"svc_fte_modellistshort",
8282
"NEW PROTOCOL",
8383
"NEW PROTOCOL",
8484
"NEW PROTOCOL",

src/qw_protocol.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ extern char *print_strings[]; // Contains descriptions of the print levels.
138138
#define svc_serverinfo 52 // serverinfo
139139
#define svc_updatepl 53 // [byte] [byte]
140140
#define svc_nails2 54
141+
#define svc_fte_modellistshort 60
141142
#define svc_fte_spawnbaseline2 66
142143
#define svc_qizmovoice 83
143144

0 commit comments

Comments
 (0)