@ -468,7 +468,7 @@ ClientCommand
called each time a player uses a " cmd " command
called each time a player uses a " cmd " command
= = = = = = = = = = = =
= = = = = = = = = = = =
*/
*/
extern float g_flWeaponCheat ;
extern cvar_t * g_enable_cheats ;
// Use CMD_ARGV, CMD_ARGV, and CMD_ARGC to get pointers the character string command.
// Use CMD_ARGV, CMD_ARGV, and CMD_ARGC to get pointers the character string command.
void ClientCommand ( edict_t * pEntity )
void ClientCommand ( edict_t * pEntity )
@ -496,7 +496,7 @@ void ClientCommand( edict_t *pEntity )
}
}
else if ( FStrEq ( pcmd , " give " ) )
else if ( FStrEq ( pcmd , " give " ) )
{
{
if ( g_flWeaponCheat ! = 0.0f )
if ( g_enable_cheats - > value ! = 0 )
{
{
int iszItem = ALLOC_STRING ( CMD_ARGV ( 1 ) ) ; // Make a copy of the classname
int iszItem = ALLOC_STRING ( CMD_ARGV ( 1 ) ) ; // Make a copy of the classname
GetClassPtr ( ( CBasePlayer * ) pev ) - > GiveNamedItem ( STRING ( iszItem ) ) ;
GetClassPtr ( ( CBasePlayer * ) pev ) - > GiveNamedItem ( STRING ( iszItem ) ) ;
@ -504,7 +504,7 @@ void ClientCommand( edict_t *pEntity )
}
}
else if ( FStrEq ( pcmd , " fire " ) )
else if ( FStrEq ( pcmd , " fire " ) )
{
{
if ( g_flWeaponCheat ! = 0.0f )
if ( g_enable_cheats - > value ! = 0 )
{
{
CBaseEntity * pPlayer = CBaseEntity : : Instance ( pEntity ) ;
CBaseEntity * pPlayer = CBaseEntity : : Instance ( pEntity ) ;
if ( CMD_ARGC ( ) > 1 )
if ( CMD_ARGC ( ) > 1 )
@ -540,7 +540,7 @@ void ClientCommand( edict_t *pEntity )
}
}
else if ( FStrEq ( pcmd , " fov " ) )
else if ( FStrEq ( pcmd , " fov " ) )
{
{
if ( g_flWeaponCheat & & CMD_ARGC ( ) > 1 )
if ( g_enable_cheats - > value ! = 0 & & CMD_ARGC ( ) > 1 )
{
{
GetClassPtr ( ( CBasePlayer * ) pev ) - > m_iFOV = atoi ( CMD_ARGV ( 1 ) ) ;
GetClassPtr ( ( CBasePlayer * ) pev ) - > m_iFOV = atoi ( CMD_ARGV ( 1 ) ) ;
}
}