From 61afe7a7b974ee50ce8186e52b26ede59a5db8f0 Mon Sep 17 00:00:00 2001 From: In-line Date: Mon, 20 Feb 2017 20:05:40 +0400 Subject: [PATCH] Update cvar.cpp/cvar.h --- rehlds/engine/cvar.cpp | 12 ++---------- rehlds/engine/cvar.h | 8 -------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/rehlds/engine/cvar.cpp b/rehlds/engine/cvar.cpp index 1275532..8ef0f78 100644 --- a/rehlds/engine/cvar.cpp +++ b/rehlds/engine/cvar.cpp @@ -586,11 +586,7 @@ void Cmd_CvarList_f(void) { // Open log int i; -#ifdef REHLDS_FIXES - for (i = 0; i < MAX_CVARLIST_FILES; i++) -#else - for (i = 0; i < 100; i++) -#endif + for (i = 0; i < MAX_CVARLIST_FILES; i++) { Q_snprintf(szTemp, ARRAYSIZE(szTemp) - 1, "cvarlist%02d.txt", i); szTemp[ARRAYSIZE(szTemp) - 1] = 0; @@ -603,11 +599,7 @@ void Cmd_CvarList_f(void) FS_Close(fp); } -#ifdef REHLDS_FIXES - if (i == MAX_CVARLIST_FILES) -#else - if (i >= 100) -#endif + if (i >= MAX_CVARLIST_FILES) { Con_Printf("Can't cvarlist! Too many existing cvarlist output files in the gamedir!\n"); return; diff --git a/rehlds/engine/cvar.h b/rehlds/engine/cvar.h index c7c0268..e6cb507 100644 --- a/rehlds/engine/cvar.h +++ b/rehlds/engine/cvar.h @@ -33,15 +33,7 @@ #include "FileSystem.h" #define MAX_CVAR_VALUE 1024 - -#ifdef REHLDS_FIXES - #define MAX_CVARLIST_FILES 100 -#if (MAX_CVARLIST_FILES < 0 || MAX_CVARLIST_FILES > 100) // Code in Cmd_CvarList_f handles only value between 0-99 -#error "MAX_CVARLIST_FILES value is out of bound" -#endif - -#endif #ifdef HOOK_ENGINE #define cvar_vars (*pcvar_vars)