blob: 133b45d6f417774af16374b6a0fe747cfa93d377 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//===========================================================================//
#ifndef GL_CVARS_H
#define GL_CVARS_H
#ifdef _WIN32
#pragma once
#endif
#include "convar.h"
#include "cmd.h"
// Stuff that's dealt with by the material system
extern ConVar mat_wireframe; // Draw the world in wireframe mode
extern ConVar mat_normals; // Draw the world with vertex normals
extern ConVar mat_luxels; // Draw lightmaps as checkerboards
extern ConVar mat_loadtextures; // Can help load levels quickly for debugging.
extern ConVar mat_bumpbasis; // Draw the world with the bump basis vectors drawn
extern ConVar mat_envmapsize; // Dimensions of square skybox bitmap (in 3D screen shots, not game textures)
extern ConVar mat_envmaptgasize;
extern ConVar mat_levelflush;
extern ConVar mat_hdr_level;
static inline bool CanCheat()
{
extern ConVar sv_cheats;
extern ConVar cl_debug_respect_cheat_vars;
#ifdef _DEBUG
bool bRespectCheatVars = cl_debug_respect_cheat_vars.GetBool() && !Cmd_IsRptActive();
if ( bRespectCheatVars )
return sv_cheats.GetBool();
return true;
#else
return sv_cheats.GetBool();
// johns 07/10/2015 - Disabled -- RPT's conditions for activating are not sufficient for this to be reasonable -
// though it requires the remote client have valve credentials to issue commands, it can be set
// to 'active' on demand by clients, and thus needs to be reworked before it can be allowed to
// bypass cheats.
// return ( sv_cheats.GetBool() || Cmd_IsRptActive() );
#endif
}
static inline int WireFrameMode( void )
{
if ( CanCheat() )
return mat_wireframe.GetInt();
return 0;
}
static inline bool ShouldDrawInWireFrameMode( void )
{
if ( CanCheat() )
return ( mat_wireframe.GetInt() != 0 );
return false;
}
extern ConVar r_drawbrushmodels;
#endif //GL_CVARS_H
|