mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-23 13:24:13 +00:00
lowmemory: prevent redefines
This commit is contained in:
parent
1365020302
commit
6953e829c4
@ -142,9 +142,9 @@ typedef void (*setpair_t)( const char *key, const void *value, void *buffer, voi
|
||||
// config strings are a general means of communication from
|
||||
// the server to all connected clients.
|
||||
// each config string can be at most CS_SIZE characters.
|
||||
|
||||
#if XASH_LOW_MEMORY == 0
|
||||
#define MAX_QPATH 64 // max length of a game pathname
|
||||
#if XASH_LOW_MEMORY == 2
|
||||
#elif XASH_LOW_MEMORY == 2
|
||||
#define MAX_QPATH 32 // should be enough for singleplayer
|
||||
#elif XASH_LOW_MEMORY == 1
|
||||
#define MAX_QPATH 48
|
||||
|
@ -2754,8 +2754,9 @@ void CL_LegacyUpdateUserinfo( sizebuf_t *msg )
|
||||
}
|
||||
else memset( player, 0, sizeof( *player ));
|
||||
}
|
||||
#if XASH_LOW_MEMORY == 0
|
||||
#define MAX_LEGACY_RESOURCES 2048
|
||||
#if XASH_LOW_MEMORY == 2
|
||||
#elif XASH_LOW_MEMORY == 2
|
||||
#define MAX_LEGACY_RESOURCES 1
|
||||
#elif XASH_LOW_MEMORY == 1
|
||||
#define MAX_LEGACY_RESOURCES 512
|
||||
|
@ -137,14 +137,15 @@ typedef enum
|
||||
|
||||
#define CIN_MAIN 0
|
||||
#define CIN_LOGO 1
|
||||
|
||||
#if XASH_LOW_MEMORY == 0
|
||||
#define MAX_DECALS 512 // touching TE_DECAL messages, etc
|
||||
#define MAX_STATIC_ENTITIES 3096 // static entities that moved on the client when level is spawn
|
||||
|
||||
#if XASH_LOW_MEMORY == 2
|
||||
#elif XASH_LOW_MEMORY == 2
|
||||
#define MAX_DECALS 256 // touching TE_DECAL messages, etc
|
||||
#define MAX_STATIC_ENTITIES 32 // static entities that moved on the client when level is spawn
|
||||
#elif XASH_LOW_MEMORY == 1
|
||||
#define MAX_DECALS 512 // touching TE_DECAL messages, etc
|
||||
#define MAX_STATIC_ENTITIES 128 // static entities that moved on the client when level is spawn
|
||||
#endif
|
||||
|
||||
|
@ -29,8 +29,10 @@ typedef enum
|
||||
// Max length of a multicast message
|
||||
#define MAX_MULTICAST 8192 // some mods spamming for rain effect
|
||||
|
||||
|
||||
#if !XASH_LOW_MEMORY
|
||||
#define MAX_INIT_MSG 0x20000 // max length of possible message
|
||||
#if XASH_LOW_MEMORY
|
||||
#else
|
||||
#define MAX_INIT_MSG 0x8000
|
||||
#endif
|
||||
// net packets type
|
||||
|
@ -89,16 +89,25 @@ GNU General Public License for more details.
|
||||
#define NETSPLIT_HEADER_SIZE 18
|
||||
|
||||
#if XASH_LOW_MEMORY == 2
|
||||
#undef MULTIPLAYER_BACKUP
|
||||
#undef SINGLEPLAYER_BACKUP
|
||||
#undef NUM_PACKET_ENTITIES
|
||||
#undef MAX_CUSTOM_BASELINES
|
||||
#undef NET_MAX_FRAGMENT
|
||||
#define MULTIPLAYER_BACKUP 4 // breaks protocol in legacy mode, new protocol status unknown
|
||||
#define SINGLEPLAYER_BACKUP 4
|
||||
#define NUM_PACKET_ENTITIES 32
|
||||
#define MAX_CUSTOM_BASELINES 8
|
||||
#define NET_MAX_FRAGMENT 32768
|
||||
#elif XASH_LOW_MEMORY == 1
|
||||
#define SINGLEPLAYER_BACKUP 4
|
||||
#define NUM_PACKET_ENTITIES 64
|
||||
#define MAX_CUSTOM_BASELINES 8
|
||||
#define NET_MAX_FRAGMENT 32768
|
||||
#undef SINGLEPLAYER_BACKUP
|
||||
#undef NUM_PACKET_ENTITIES
|
||||
#undef MAX_CUSTOM_BASELINES
|
||||
#undef NET_MAX_FRAGMENT
|
||||
#define SINGLEPLAYER_BACKUP 4
|
||||
#define NUM_PACKET_ENTITIES 64
|
||||
#define MAX_CUSTOM_BASELINES 8
|
||||
#define NET_MAX_FRAGMENT 32768
|
||||
#endif
|
||||
|
||||
typedef struct netsplit_chain_packet_s
|
||||
|
@ -183,6 +183,17 @@ GNU General Public License for more details.
|
||||
#define FRAGMENT_LOCAL_SIZE FRAGMENT_MAX_SIZE // local connection
|
||||
|
||||
#if XASH_LOW_MEMORY == 2
|
||||
#undef MAX_VISIBLE_PACKET
|
||||
#undef MAX_VISIBLE_PACKET_VIS_BYTES
|
||||
#undef MAX_EVENTS
|
||||
#undef MAX_SUPPORTED_MODELS
|
||||
#undef MAX_MODELS
|
||||
#undef MAX_SOUNDS
|
||||
#undef MAX_CUSTOM
|
||||
#undef MAX_DLIGHTS
|
||||
#undef MAX_ELIGHTS
|
||||
#undef MAX_RENDER_DECALS
|
||||
#undef MAX_RESOURCES
|
||||
// memory reduced protocol, not for use in multiplayer (but still compatible)
|
||||
#define MAX_VISIBLE_PACKET 128
|
||||
#define MAX_VISIBLE_PACKET_VIS_BYTES ((MAX_VISIBLE_PACKET + 7) / 8)
|
||||
@ -202,6 +213,14 @@ GNU General Public License for more details.
|
||||
#define MAX_RENDER_DECALS 64 // max rendering decals per a level
|
||||
#define MAX_RESOURCES 1024
|
||||
#elif XASH_LOW_MEMORY == 1
|
||||
#undef MAX_VISIBLE_PACKET
|
||||
#undef MAX_VISIBLE_PACKET_VIS_BYTES
|
||||
#undef MAX_EVENTS
|
||||
#undef MAX_SUPPORTED_MODELS
|
||||
#undef MAX_MODELS
|
||||
#undef MAX_CUSTOM
|
||||
#undef MAX_RENDER_DECALS
|
||||
#undef MAX_RESOURCES
|
||||
#define MAX_VISIBLE_PACKET 256
|
||||
#define MAX_VISIBLE_PACKET_VIS_BYTES ((MAX_VISIBLE_PACKET + 7) / 8)
|
||||
|
||||
@ -212,7 +231,7 @@ GNU General Public License for more details.
|
||||
#define MAX_MODELS 1024
|
||||
|
||||
#define MAX_CUSTOM 512
|
||||
|
||||
#define MAX_RENDER_DECALS 128
|
||||
#define MAX_RESOURCES 1024
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user