diff --git a/Quake/host.c b/Quake/host.c index 27e4413a..03b06869 100644 --- a/Quake/host.c +++ b/Quake/host.c @@ -59,7 +59,7 @@ cvar_t host_framerate = {"host_framerate","0"}; // set for slow motion cvar_t host_speeds = {"host_speeds","0"}; // set for running times cvar_t host_maxfps = {"host_maxfps", "72", true}; //johnfitz cvar_t host_timescale = {"host_timescale", "0"}; //johnfitz -cvar_t max_edicts = {"max_edicts", "2048", true}; //johnfitz +cvar_t max_edicts = {"max_edicts", STR(DEF_EDICTS), true}; //johnfitz cvar_t sys_ticrate = {"sys_ticrate","0.05"}; // dedicated server cvar_t serverprofile = {"serverprofile","0"}; @@ -91,7 +91,7 @@ Max_Edicts_f -- johnfitz */ void Max_Edicts_f (void) { - static float oldval = 1024; //must match the default value for max_edicts + static float oldval = DEF_EDICTS; //must match the default value for max_edicts //TODO: clamp it here? diff --git a/Quake/quakedef.h b/Quake/quakedef.h index cf6cbc06..7c5e25eb 100644 --- a/Quake/quakedef.h +++ b/Quake/quakedef.h @@ -23,6 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef __QUAKEDEFS_H #define __QUAKEDEFS_H +// numeric macro to string conversion +#define STR_(x) #x +#define STR(x) STR_(x) + // quakedef.h -- primary header for client #define QUAKE_GAME // as opposed to utilities @@ -101,6 +105,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MIN_EDICTS 256 // johnfitz -- lowest allowed value for max_edicts cvar #define MAX_EDICTS 32000 // johnfitz -- highest allowed value for max_edicts cvar // ents past 8192 can't play sounds in the standard protocol +#define DEF_EDICTS 2048 + #define MAX_LIGHTSTYLES 64 #define MAX_MODELS 2048 // johnfitz -- was 256 #define MAX_SOUNDS 2048 // johnfitz -- was 256