From 8a265746f1190e116f0e985467fba7a7a2627143 Mon Sep 17 00:00:00 2001 From: Adidasman1 Date: Wed, 9 Mar 2016 00:02:47 +0400 Subject: [PATCH] Get rid of the magic numbers. --- rehlds/engine/sv_main.cpp | 4 ++-- rehlds/engine/sys_dll.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 4847ffe..8c8e884 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -6409,7 +6409,7 @@ void SV_BanId_f(void) if (i >= numuserfilters) { - if (numuserfilters >= 32768) + if (numuserfilters >= MAX_USERFILTERS) { Con_Printf(__FUNCTION__ ": User filter list is full\n"); return; @@ -6855,7 +6855,7 @@ ipaddress A.B.C.D/24 is equivalent to A.B.C.0 and A.B.C\n"); } } - if (numipfilters >= 32768) + if (numipfilters >= MAX_IPFILTERS) { Con_Printf("IP filter list is full\n"); return; diff --git a/rehlds/engine/sys_dll.cpp b/rehlds/engine/sys_dll.cpp index 7f2dffd..10c5709 100644 --- a/rehlds/engine/sys_dll.cpp +++ b/rehlds/engine/sys_dll.cpp @@ -848,8 +848,8 @@ void DLL_SetModKey(modinfo_t *pinfo, char *pkey, char *pvalue) else if (!Q_stricmp(pkey, "edicts")) { pinfo->num_edicts = Q_atoi(pvalue); - if (pinfo->num_edicts < 900) - pinfo->num_edicts = 900; + if (pinfo->num_edicts < NUM_EDICTS) + pinfo->num_edicts = NUM_EDICTS; } else if (!Q_stricmp(pkey, "crcclientdll")) {