mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-04-28 16:09:34 +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"))
|
else if (FStrEq(pcmd, "fov"))
|
||||||
{
|
{
|
||||||
#if 0
|
#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));
|
GetClassPtr<CCSPlayer>((CBasePlayer *)pev)->m_iFOV = Q_atoi(CMD_ARGV(1));
|
||||||
else
|
else
|
||||||
CLIENT_PRINTF(pEntity, print_console, UTIL_VarArgs("\"fov\" is \"%d\"\n", int(GetClassPtr<CCSPlayer>((CBasePlayer *)pev)->m_iFOV)));
|
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);
|
UpdateGameMode(pl);
|
||||||
|
|
||||||
if (!g_flWeaponCheat)
|
if (!CVAR_GET_FLOAT("sv_cheats"))
|
||||||
{
|
{
|
||||||
MESSAGE_BEGIN(MSG_ONE, gmsgViewMode, nullptr, pl->edict());
|
MESSAGE_BEGIN(MSG_ONE, gmsgViewMode, nullptr, pl->edict());
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
|
@ -6060,7 +6060,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(ImpulseCommands)()
|
|||||||
|
|
||||||
void CBasePlayer::CheatImpulseCommands(int iImpulse)
|
void CBasePlayer::CheatImpulseCommands(int iImpulse)
|
||||||
{
|
{
|
||||||
if (!g_flWeaponCheat)
|
if (!CVAR_GET_FLOAT("sv_cheats"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CBaseEntity *pEntity;
|
CBaseEntity *pEntity;
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
edict_t *g_pBodyQueueHead;
|
edict_t *g_pBodyQueueHead;
|
||||||
CGlobalState gGlobalState;
|
CGlobalState gGlobalState;
|
||||||
float g_flWeaponCheat;
|
|
||||||
|
|
||||||
DLL_DECALLIST gDecals[] =
|
DLL_DECALLIST gDecals[] =
|
||||||
{
|
{
|
||||||
@ -216,7 +215,6 @@ void CWorld::Spawn()
|
|||||||
EmptyEntityHashTable();
|
EmptyEntityHashTable();
|
||||||
Precache();
|
Precache();
|
||||||
|
|
||||||
g_flWeaponCheat = CVAR_GET_FLOAT("sv_cheats");
|
|
||||||
g_szMapBriefingText[0] = '\0';
|
g_szMapBriefingText[0] = '\0';
|
||||||
Q_sprintf(szMapBriefingFile, "maps/%s.txt", STRING(gpGlobals->mapname));
|
Q_sprintf(szMapBriefingFile, "maps/%s.txt", STRING(gpGlobals->mapname));
|
||||||
|
|
||||||
@ -251,7 +249,6 @@ void CWorld::Spawn()
|
|||||||
EmptyEntityHashTable();
|
EmptyEntityHashTable();
|
||||||
Precache();
|
Precache();
|
||||||
|
|
||||||
g_flWeaponCheat = CVAR_GET_FLOAT("sv_cheats");
|
|
||||||
g_szMapBriefingText[0] = '\0';
|
g_szMapBriefingText[0] = '\0';
|
||||||
|
|
||||||
int flength = 0;
|
int flength = 0;
|
||||||
|
@ -43,5 +43,4 @@ public:
|
|||||||
void CopyToBodyQue(entvars_t *pev);
|
void CopyToBodyQue(entvars_t *pev);
|
||||||
void ClearBodyQue();
|
void ClearBodyQue();
|
||||||
|
|
||||||
extern float g_flWeaponCheat;
|
|
||||||
extern char g_szMapBriefingText[512];
|
extern char g_szMapBriefingText[512];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user