mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-23 21:34:15 +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
|
// config strings are a general means of communication from
|
||||||
// the server to all connected clients.
|
// the server to all connected clients.
|
||||||
// each config string can be at most CS_SIZE characters.
|
// 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
|
#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
|
#define MAX_QPATH 32 // should be enough for singleplayer
|
||||||
#elif XASH_LOW_MEMORY == 1
|
#elif XASH_LOW_MEMORY == 1
|
||||||
#define MAX_QPATH 48
|
#define MAX_QPATH 48
|
||||||
|
@ -2754,8 +2754,9 @@ void CL_LegacyUpdateUserinfo( sizebuf_t *msg )
|
|||||||
}
|
}
|
||||||
else memset( player, 0, sizeof( *player ));
|
else memset( player, 0, sizeof( *player ));
|
||||||
}
|
}
|
||||||
|
#if XASH_LOW_MEMORY == 0
|
||||||
#define MAX_LEGACY_RESOURCES 2048
|
#define MAX_LEGACY_RESOURCES 2048
|
||||||
#if XASH_LOW_MEMORY == 2
|
#elif XASH_LOW_MEMORY == 2
|
||||||
#define MAX_LEGACY_RESOURCES 1
|
#define MAX_LEGACY_RESOURCES 1
|
||||||
#elif XASH_LOW_MEMORY == 1
|
#elif XASH_LOW_MEMORY == 1
|
||||||
#define MAX_LEGACY_RESOURCES 512
|
#define MAX_LEGACY_RESOURCES 512
|
||||||
|
@ -137,14 +137,15 @@ typedef enum
|
|||||||
|
|
||||||
#define CIN_MAIN 0
|
#define CIN_MAIN 0
|
||||||
#define CIN_LOGO 1
|
#define CIN_LOGO 1
|
||||||
|
#if XASH_LOW_MEMORY == 0
|
||||||
#define MAX_DECALS 512 // touching TE_DECAL messages, etc
|
#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
|
#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_DECALS 256 // touching TE_DECAL messages, etc
|
||||||
#define MAX_STATIC_ENTITIES 32 // static entities that moved on the client when level is spawn
|
#define MAX_STATIC_ENTITIES 32 // static entities that moved on the client when level is spawn
|
||||||
#elif XASH_LOW_MEMORY == 1
|
#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
|
#define MAX_STATIC_ENTITIES 128 // static entities that moved on the client when level is spawn
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -29,8 +29,10 @@ typedef enum
|
|||||||
// Max length of a multicast message
|
// Max length of a multicast message
|
||||||
#define MAX_MULTICAST 8192 // some mods spamming for rain effect
|
#define MAX_MULTICAST 8192 // some mods spamming for rain effect
|
||||||
|
|
||||||
|
|
||||||
|
#if !XASH_LOW_MEMORY
|
||||||
#define MAX_INIT_MSG 0x20000 // max length of possible message
|
#define MAX_INIT_MSG 0x20000 // max length of possible message
|
||||||
#if XASH_LOW_MEMORY
|
#else
|
||||||
#define MAX_INIT_MSG 0x8000
|
#define MAX_INIT_MSG 0x8000
|
||||||
#endif
|
#endif
|
||||||
// net packets type
|
// net packets type
|
||||||
|
@ -89,16 +89,25 @@ GNU General Public License for more details.
|
|||||||
#define NETSPLIT_HEADER_SIZE 18
|
#define NETSPLIT_HEADER_SIZE 18
|
||||||
|
|
||||||
#if XASH_LOW_MEMORY == 2
|
#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 MULTIPLAYER_BACKUP 4 // breaks protocol in legacy mode, new protocol status unknown
|
||||||
#define SINGLEPLAYER_BACKUP 4
|
#define SINGLEPLAYER_BACKUP 4
|
||||||
#define NUM_PACKET_ENTITIES 32
|
#define NUM_PACKET_ENTITIES 32
|
||||||
#define MAX_CUSTOM_BASELINES 8
|
#define MAX_CUSTOM_BASELINES 8
|
||||||
#define NET_MAX_FRAGMENT 32768
|
#define NET_MAX_FRAGMENT 32768
|
||||||
#elif XASH_LOW_MEMORY == 1
|
#elif XASH_LOW_MEMORY == 1
|
||||||
#define SINGLEPLAYER_BACKUP 4
|
#undef SINGLEPLAYER_BACKUP
|
||||||
#define NUM_PACKET_ENTITIES 64
|
#undef NUM_PACKET_ENTITIES
|
||||||
#define MAX_CUSTOM_BASELINES 8
|
#undef MAX_CUSTOM_BASELINES
|
||||||
#define NET_MAX_FRAGMENT 32768
|
#undef NET_MAX_FRAGMENT
|
||||||
|
#define SINGLEPLAYER_BACKUP 4
|
||||||
|
#define NUM_PACKET_ENTITIES 64
|
||||||
|
#define MAX_CUSTOM_BASELINES 8
|
||||||
|
#define NET_MAX_FRAGMENT 32768
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct netsplit_chain_packet_s
|
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
|
#define FRAGMENT_LOCAL_SIZE FRAGMENT_MAX_SIZE // local connection
|
||||||
|
|
||||||
#if XASH_LOW_MEMORY == 2
|
#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)
|
// memory reduced protocol, not for use in multiplayer (but still compatible)
|
||||||
#define MAX_VISIBLE_PACKET 128
|
#define MAX_VISIBLE_PACKET 128
|
||||||
#define MAX_VISIBLE_PACKET_VIS_BYTES ((MAX_VISIBLE_PACKET + 7) / 8)
|
#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_RENDER_DECALS 64 // max rendering decals per a level
|
||||||
#define MAX_RESOURCES 1024
|
#define MAX_RESOURCES 1024
|
||||||
#elif XASH_LOW_MEMORY == 1
|
#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 256
|
||||||
#define MAX_VISIBLE_PACKET_VIS_BYTES ((MAX_VISIBLE_PACKET + 7) / 8)
|
#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_MODELS 1024
|
||||||
|
|
||||||
#define MAX_CUSTOM 512
|
#define MAX_CUSTOM 512
|
||||||
|
#define MAX_RENDER_DECALS 128
|
||||||
#define MAX_RESOURCES 1024
|
#define MAX_RESOURCES 1024
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user