2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-29 08:05:50 +03:00

Update cvar.cpp/cvar.h

This commit is contained in:
In-line 2017-02-20 20:05:40 +04:00
parent bd8019da9f
commit 61afe7a7b9
2 changed files with 2 additions and 18 deletions

View File

@ -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;

View File

@ -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)