diff --git a/doc/100_tested_maps.md b/doc/100_tested_maps.md index 4d39d89b..ef0f1cfc 100644 --- a/doc/100_tested_maps.md +++ b/doc/100_tested_maps.md @@ -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 | diff --git a/src/client/cl_parse.c b/src/client/cl_parse.c index 95ec1ee0..9028655c 100644 --- a/src/client/cl_parse.c +++ b/src/client/cl_parse.c @@ -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) { diff --git a/src/common/header/shared.h b/src/common/header/shared.h index ae1f19e4..4ed49d0b 100644 --- a/src/common/header/shared.h +++ b/src/common/header/shared.h @@ -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) diff --git a/src/game/header/game.h b/src/game/header/game.h index a8e2f81e..683d201c 100644 --- a/src/game/header/game.h +++ b/src/game/header/game.h @@ -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 */