client: bump protocol and game version / unstable compatibility

Config string numbers is different to original Quake 2 code,
code is not compatible with any version of official protocols or
game code. And game code should be recompiled for use with engine.
This commit is contained in:
Denis Pauk 2024-02-29 00:00:28 +02:00
parent 28668972ff
commit 6973181a21
4 changed files with 59 additions and 8 deletions

View File

@ -8,9 +8,6 @@
## Quake2 ReRelease
Notes:
* mgu5m2: server code: Too many models 256 (226 inline models)
| map | gl1.4 | gl3/gles3 | gl4.6 | vk | soft |
| ------------------------------ | ------ | --------- | ------ | ------ | ----------- |
| badlands.bsp | OK | N/A | N/A | OK | N/A |
@ -80,7 +77,7 @@ Notes:
| mgu4m3.bsp | OK | N/A | N/A | OK | N/A |
| mgu4trial.bsp | OK | N/A | N/A | OK | N/A |
| mgu5m1.bsp | OK | N/A | N/A | OK | N/A |
| mgu5m2.bsp | B | N/A | N/A | B | N/A |
| mgu5m2.bsp | OK | N/A | N/A | OK | N/A |
| mgu5m3.bsp | OK | N/A | N/A | OK | N/A |
| mgu5trial.bsp | OK | N/A | N/A | OK | N/A |
| mgu6m1.bsp | OK | N/A | N/A | OK | N/A |

View File

@ -1125,6 +1125,40 @@ CL_ParseConfigString(void)
i = MSG_ReadShort(&net_message);
if (cls.serverProtocol == PROTOCOL_RELEASE_VERSION ||
cls.serverProtocol == PROTOCOL_DEMO_VERSION ||
cls.serverProtocol == PROTOCOL_RR97_VERSION)
{
if (i >= CS_MODELS_Q2DEMO && i < CS_SOUNDS_Q2DEMO)
{
i += CS_MODELS - CS_MODELS_Q2DEMO;
}
else if (i >= CS_SOUNDS_Q2DEMO && i < CS_IMAGES_Q2DEMO)
{
i += CS_SOUNDS - CS_SOUNDS_Q2DEMO;
}
else if (i >= CS_IMAGES_Q2DEMO && i < CS_LIGHTS_Q2DEMO)
{
i += CS_IMAGES - CS_IMAGES_Q2DEMO;
}
else if (i >= CS_LIGHTS_Q2DEMO && i < CS_ITEMS_Q2DEMO)
{
i += CS_LIGHTS - CS_LIGHTS_Q2DEMO;
}
else if (i >= CS_ITEMS_Q2DEMO && i < CS_PLAYERSKINS_Q2DEMO)
{
i += CS_ITEMS - CS_ITEMS_Q2DEMO;
}
else if (i >= CS_PLAYERSKINS_Q2DEMO && i < CS_GENERAL_Q2DEMO)
{
i += CS_PLAYERSKINS - CS_PLAYERSKINS_Q2DEMO;
}
else if (i >= CS_GENERAL_Q2DEMO && i < MAX_CONFIGSTRINGS_Q2DEMO)
{
i += CS_GENERAL - CS_GENERAL_Q2DEMO;
}
}
if ((i < 0) || (i >= MAX_CONFIGSTRINGS))
{
Com_Error(ERR_DROP, "%s: configstring > MAX_CONFIGSTRINGS", __func__);
@ -1173,7 +1207,7 @@ CL_ParseConfigString(void)
}
}
}
else if ((i >= CS_SOUNDS) && (i < CS_SOUNDS + MAX_MODELS))
else if ((i >= CS_SOUNDS) && (i < CS_SOUNDS + MAX_SOUNDS))
{
if (cl.refresh_prepped)
{
@ -1181,7 +1215,7 @@ CL_ParseConfigString(void)
S_RegisterSound(cl.configstrings[i]);
}
}
else if ((i >= CS_IMAGES) && (i < CS_IMAGES + MAX_MODELS))
else if ((i >= CS_IMAGES) && (i < CS_IMAGES + MAX_IMAGES))
{
if (cl.refresh_prepped)
{

View File

@ -169,11 +169,21 @@ typedef unsigned char byte;
#define PRINTF_ATTR(FMT, VARGS) __attribute__((format(printf, FMT , VARGS )))
#endif
/* per-level limits Quake 2 Protocol version 26 */
#define MAX_CLIENTS_Q2DEMO 256 /* absolute limit */
#define MAX_EDICTS_Q2DEMO 1024 /* must change protocol to increase more */
#define MAX_LIGHTSTYLES_Q2DEMO 256
#define MAX_MODELS_Q2DEMO 256 /* these are sent over the net as bytes */
#define MAX_SOUNDS_Q2DEMO 256 /* so they cannot be blindly increased */
#define MAX_IMAGES_Q2DEMO 256
#define MAX_ITEMS_Q2DEMO 256
#define MAX_GENERAL_Q2DEMO (MAX_CLIENTS_Q2DEMO * 2) /* general config strings */
/* per-level limits */
#define MAX_CLIENTS 256 /* absolute limit */
#define MAX_EDICTS 1024 /* must change protocol to increase more */
#define MAX_LIGHTSTYLES 256
#define MAX_MODELS 256 /* these are sent over the net as bytes */
#define MAX_MODELS 512 /* these are sent over the net as bytes */
#define MAX_SOUNDS 256 /* so they cannot be blindly increased */
#define MAX_IMAGES 256
#define MAX_ITEMS 256
@ -1154,6 +1164,16 @@ typedef enum
#define CS_MAXCLIENTS 30
#define CS_MAPCHECKSUM 31 /* for catching cheater maps */
/* CS structure Quake 2 Protocol version 26 */
#define CS_MODELS_Q2DEMO 32
#define CS_SOUNDS_Q2DEMO (CS_MODELS_Q2DEMO + MAX_MODELS_Q2DEMO)
#define CS_IMAGES_Q2DEMO (CS_SOUNDS_Q2DEMO + MAX_SOUNDS_Q2DEMO)
#define CS_LIGHTS_Q2DEMO (CS_IMAGES_Q2DEMO + MAX_IMAGES_Q2DEMO)
#define CS_ITEMS_Q2DEMO (CS_LIGHTS_Q2DEMO + MAX_LIGHTSTYLES_Q2DEMO)
#define CS_PLAYERSKINS_Q2DEMO (CS_ITEMS_Q2DEMO + MAX_ITEMS_Q2DEMO)
#define CS_GENERAL_Q2DEMO (CS_PLAYERSKINS_Q2DEMO + MAX_CLIENTS_Q2DEMO)
#define MAX_CONFIGSTRINGS_Q2DEMO (CS_GENERAL_Q2DEMO + MAX_GENERAL_Q2DEMO)
#define CS_MODELS 32
#define CS_SOUNDS (CS_MODELS + MAX_MODELS)
#define CS_IMAGES (CS_SOUNDS + MAX_SOUNDS)

View File

@ -35,7 +35,7 @@
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/
#define GAME_API_VERSION 3
#define GAME_API_VERSION 4
/* edict->svflags */
#define SVF_NOCLIENT 0x00000001 /* don't send entity to clients, even if it has effects */