From 24b3aa7d751d9371b2c5aa8ffed5746964b05546 Mon Sep 17 00:00:00 2001 From: TimePath Date: Sun, 16 Jul 2017 17:08:32 +1000 Subject: [PATCH] Add a few default definitions here so they can be easily discovered --- CMakeLists.txt | 3 +++ qcsrc/client/view.qc | 2 +- qcsrc/common/debug.qh | 4 ++-- qcsrc/common/effects/all.qc | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bbed1b243b..d550d7b6c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,9 @@ include_directories(qcsrc) add_definitions(-DXONOTIC=1) add_definitions(-DNDEBUG=1) +add_definitions(-DENABLE_EFFECTINFO=0) +add_definitions(-DENABLE_DEBUGDRAW=0) +add_definitions(-DENABLE_DEBUGTRACE=0) find_package(Git REQUIRED) if (DEFINED ENV{VERSION}) diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 75afcfccb1..9b78e49074 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -2256,7 +2256,7 @@ void CSQC_UpdateView(entity this, float w, float h) // draw 2D entities IL_EACH(g_drawables_2d, it.draw2d, it.draw2d(it)); Draw_ShowNames_All(); -#ifdef DEBUGDRAW +#if ENABLE_DEBUGDRAW Debug_Draw(); #endif diff --git a/qcsrc/common/debug.qh b/qcsrc/common/debug.qh index 7aabe69a90..28153a7d40 100644 --- a/qcsrc/common/debug.qh +++ b/qcsrc/common/debug.qh @@ -47,7 +47,7 @@ REGISTER_NET_TEMP(net_debug) } #endif -#ifdef DEBUGDRAW +#if ENABLE_DEBUGDRAW #ifdef GAMEQC /** * 0: off @@ -259,7 +259,7 @@ GENERIC_COMMAND(cvar_localchanges, "Print locally changed cvars") } } -#ifdef DEBUGTRACE +#if ENABLE_DEBUGTRACE REGISTER_STAT(TRACE_ENT, int) #ifdef SVQC bool autocvar_debugtrace; diff --git a/qcsrc/common/effects/all.qc b/qcsrc/common/effects/all.qc index f43b25dcfb..af41054e31 100644 --- a/qcsrc/common/effects/all.qc +++ b/qcsrc/common/effects/all.qc @@ -91,6 +91,6 @@ void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt) } #endif -#ifdef EFFECTINFO_ENABLED +#if ENABLE_EFFECTINFO #include "effectinfo.qc" #endif -- 2.39.2