summaryrefslogtreecommitdiff
path: root/game/client/cstrike/buy_presets/buy_preset_debug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/client/cstrike/buy_presets/buy_preset_debug.cpp')
-rw-r--r--game/client/cstrike/buy_presets/buy_preset_debug.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/game/client/cstrike/buy_presets/buy_preset_debug.cpp b/game/client/cstrike/buy_presets/buy_preset_debug.cpp
new file mode 100644
index 0000000..afe3e23
--- /dev/null
+++ b/game/client/cstrike/buy_presets/buy_preset_debug.cpp
@@ -0,0 +1,65 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================
+
+// Author: Matthew D. Campbell ([email protected]), 2004
+
+#include "cbase.h"
+#include "buy_preset_debug.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+#ifdef _DEBUG
+#define BUY_PRESET_DEBUGGING 1
+#else
+#define BUY_PRESET_DEBUGGING 0
+#endif
+
+#if BUY_PRESET_DEBUGGING
+
+static ConVar cl_preset_debug( "cl_preset_debug", "0", 0, "Controls debug information about buy presets" );
+
+//--------------------------------------------------------------------------------------------------------------
+bool IsPresetDebuggingEnabled()
+{
+ return cl_preset_debug.GetInt() >= 1.0f;
+}
+
+//--------------------------------------------------------------------------------------------------------------
+bool IsPresetFullCostDebuggingEnabled()
+{
+ return cl_preset_debug.GetInt() == 2.0f;
+}
+
+//--------------------------------------------------------------------------------------------------------------
+bool IsPresetCurrentCostDebuggingEnabled()
+{
+ return cl_preset_debug.GetInt() == 3.0f;
+}
+
+#else // ! BUY_PRESET_DEBUGGING
+
+//--------------------------------------------------------------------------------------------------------------
+bool IsPresetDebuggingEnabled()
+{
+ return false;
+}
+
+//--------------------------------------------------------------------------------------------------------------
+bool IsPresetFullCostDebuggingEnabled()
+{
+ return false;
+}
+
+//--------------------------------------------------------------------------------------------------------------
+bool IsPresetCurrentCostDebuggingEnabled()
+{
+ return false;
+}
+
+#endif // ! BUY_PRESET_DEBUGGING
+
+//--------------------------------------------------------------------------------------------------------------