client: add xatrix demo protocol check

This commit is contained in:
Denis Pauk 2024-03-21 00:49:56 +02:00
parent 3e7e3bad39
commit ee5d131b9c
3 changed files with 13 additions and 0 deletions

View File

@ -145,6 +145,7 @@ CL_ParseDelta(entity_state_t *from, entity_state_t *to, int number, int bits)
if ((cls.serverProtocol == PROTOCOL_RELEASE_VERSION) ||
(cls.serverProtocol == PROTOCOL_DEMO_VERSION) ||
(cls.serverProtocol == PROTOCOL_XATRIX_VERSION) ||
(cls.serverProtocol == PROTOCOL_RR97_VERSION))
{
if (bits & U_MODEL)
@ -546,6 +547,7 @@ CL_ConvertConfigStringFrom(int i)
{
if (cls.serverProtocol == PROTOCOL_RELEASE_VERSION ||
cls.serverProtocol == PROTOCOL_DEMO_VERSION ||
cls.serverProtocol == PROTOCOL_XATRIX_VERSION ||
cls.serverProtocol == PROTOCOL_RR97_VERSION)
{
if (i >= CS_MODELS_Q2DEMO && i < CS_SOUNDS_Q2DEMO)
@ -922,6 +924,7 @@ CL_ParseServerData(void)
if (Com_ServerState() && (
(i == PROTOCOL_RELEASE_VERSION) ||
(i == PROTOCOL_DEMO_VERSION) ||
(i == PROTOCOL_XATRIX_VERSION) ||
(i == PROTOCOL_RR97_VERSION) ||
(i == PROTOCOL_RR22_VERSION) ||
(i == PROTOCOL_RR23_VERSION) ||
@ -933,18 +936,25 @@ CL_ParseServerData(void)
case PROTOCOL_RELEASE_VERSION:
Com_Printf("Quake 2 Demo\n");
break;
case PROTOCOL_XATRIX_VERSION:
Com_Printf("Quake 2 Xatrix Demo\n");
break;
case PROTOCOL_DEMO_VERSION:
Com_Printf("Quake 2 Release Demo\n");
break;
/* Network protocol */
case PROTOCOL_RR97_VERSION:
Com_Printf("Quake 2\n");
break;
/* ReRelease Demo */
case PROTOCOL_RR22_VERSION:
Com_Printf("ReRelease Quake 2 Demo\n");
break;
/* ReRelease network protocol */
case PROTOCOL_RR23_VERSION:
Com_Printf("ReRelease Quake 2\n");
break;
/* Our new protocol */
case PROTOCOL_VERSION:
Com_Printf("ReRelease Quake 2 Custom version\n");
break;

View File

@ -179,6 +179,8 @@ void Info_Print(char *s);
#define PROTOCOL_RELEASE_VERSION 26
/* Quake 2 Demo */
#define PROTOCOL_DEMO_VERSION 31
/* Quake 2 Xatrix Demo */
#define PROTOCOL_XATRIX_VERSION 32
/* Quake 2 Network Release */
#define PROTOCOL_RR97_VERSION 34
/* ReRelease demo files */

View File

@ -647,6 +647,7 @@ MSG_WriteDeltaEntity(entity_state_t *from,
if ((protocol == PROTOCOL_RELEASE_VERSION) ||
(protocol == PROTOCOL_DEMO_VERSION) ||
(protocol == PROTOCOL_XATRIX_VERSION) ||
(protocol == PROTOCOL_RR97_VERSION))
{
if (bits & U_MODEL)