From 60ad340d725509cd7f78bf95640b63afad3cbb34 Mon Sep 17 00:00:00 2001 From: Sander van Dijk Date: Fri, 14 Sep 2012 19:03:31 +0000 Subject: [PATCH] Simplify r343 (the "oldval" stuff is already handled by the cvar system itself) git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@723 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/host.c | 8 +------- Quake/quakedef.h | 6 ------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Quake/host.c b/Quake/host.c index 9337fe2b..20b046e8 100644 --- a/Quake/host.c +++ b/Quake/host.c @@ -61,7 +61,7 @@ cvar_t host_framerate = {"host_framerate","0",CVAR_NONE}; // set for slow motion cvar_t host_speeds = {"host_speeds","0",CVAR_NONE}; // set for running times cvar_t host_maxfps = {"host_maxfps", "72", CVAR_ARCHIVE}; //johnfitz cvar_t host_timescale = {"host_timescale", "0", CVAR_NONE}; //johnfitz -cvar_t max_edicts = {"max_edicts", STR(DEF_EDICTS), CVAR_ARCHIVE}; //johnfitz +cvar_t max_edicts = {"max_edicts", "2048", CVAR_ARCHIVE}; //johnfitz cvar_t sys_ticrate = {"sys_ticrate","0.05",CVAR_NONE}; // dedicated server cvar_t serverprofile = {"serverprofile","0",CVAR_NONE}; @@ -95,16 +95,10 @@ Max_Edicts_f -- johnfitz */ static void Max_Edicts_f (cvar_t *var) { - static float oldval = DEF_EDICTS; //must match the default value for max_edicts - //TODO: clamp it here? - if (max_edicts.value == oldval) - return; if (cls.state == ca_connected || sv.active) Con_Printf ("Changes to max_edicts will not take effect until the next time a map is loaded.\n"); - - oldval = max_edicts.value; } /* diff --git a/Quake/quakedef.h b/Quake/quakedef.h index 32258563..1ece0c61 100644 --- a/Quake/quakedef.h +++ b/Quake/quakedef.h @@ -23,10 +23,6 @@ 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 @@ -87,8 +83,6 @@ 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