mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-27 14:08:00 +03:00
Removed cache of cvar sv_cheats ValveSoftware/halflife#2511
This commit is contained in:
parent
caf1b47238
commit
62cb200a3b
@ -3298,7 +3298,7 @@ void EXT_FUNC InternalCommand(edict_t *pEntity, const char *pcmd, const char *pa
|
||||
else if (FStrEq(pcmd, "fov"))
|
||||
{
|
||||
#if 0
|
||||
if (g_flWeaponCheat && CMD_ARGC() > 1)
|
||||
if (CVAR_GET_FLOAT("sv_cheats") != 0.0f && CMD_ARGC() > 1)
|
||||
GetClassPtr<CCSPlayer>((CBasePlayer *)pev)->m_iFOV = Q_atoi(CMD_ARGV(1));
|
||||
else
|
||||
CLIENT_PRINTF(pEntity, print_console, UTIL_VarArgs("\"fov\" is \"%d\"\n", int(GetClassPtr<CCSPlayer>((CBasePlayer *)pev)->m_iFOV)));
|
||||
|
@ -3243,7 +3243,7 @@ void CHalfLifeMultiplay::InitHUD(CBasePlayer *pl)
|
||||
|
||||
UpdateGameMode(pl);
|
||||
|
||||
if (!g_flWeaponCheat)
|
||||
if (!CVAR_GET_FLOAT("sv_cheats"))
|
||||
{
|
||||
MESSAGE_BEGIN(MSG_ONE, gmsgViewMode, nullptr, pl->edict());
|
||||
MESSAGE_END();
|
||||
|
@ -6060,7 +6060,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(ImpulseCommands)()
|
||||
|
||||
void CBasePlayer::CheatImpulseCommands(int iImpulse)
|
||||
{
|
||||
if (!g_flWeaponCheat)
|
||||
if (!CVAR_GET_FLOAT("sv_cheats"))
|
||||
return;
|
||||
|
||||
CBaseEntity *pEntity;
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
edict_t *g_pBodyQueueHead;
|
||||
CGlobalState gGlobalState;
|
||||
float g_flWeaponCheat;
|
||||
|
||||
DLL_DECALLIST gDecals[] =
|
||||
{
|
||||
@ -216,7 +215,6 @@ void CWorld::Spawn()
|
||||
EmptyEntityHashTable();
|
||||
Precache();
|
||||
|
||||
g_flWeaponCheat = CVAR_GET_FLOAT("sv_cheats");
|
||||
g_szMapBriefingText[0] = '\0';
|
||||
Q_sprintf(szMapBriefingFile, "maps/%s.txt", STRING(gpGlobals->mapname));
|
||||
|
||||
@ -251,7 +249,6 @@ void CWorld::Spawn()
|
||||
EmptyEntityHashTable();
|
||||
Precache();
|
||||
|
||||
g_flWeaponCheat = CVAR_GET_FLOAT("sv_cheats");
|
||||
g_szMapBriefingText[0] = '\0';
|
||||
|
||||
int flength = 0;
|
||||
|
@ -43,5 +43,4 @@ public:
|
||||
void CopyToBodyQue(entvars_t *pev);
|
||||
void ClearBodyQue();
|
||||
|
||||
extern float g_flWeaponCheat;
|
||||
extern char g_szMapBriefingText[512];
|
||||
|
Loading…
x
Reference in New Issue
Block a user