From c704a4ee95df87b5e7a685f051b52e7857a34a09 Mon Sep 17 00:00:00 2001 From: GreYFoXGTi Date: Sun, 31 Oct 2010 19:47:10 +0200 Subject: [PATCH] a gift for btd --- src/engine/shared/config_variables.h | 1 + src/game/gamecore.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/engine/shared/config_variables.h b/src/engine/shared/config_variables.h index b8ec0db8b..e2b610093 100644 --- a/src/engine/shared/config_variables.h +++ b/src/engine/shared/config_variables.h @@ -150,4 +150,5 @@ MACRO_CONFIG_INT(SvTeam, sv_team, 0, -1, 1, CFGFLAG_SERVER, "Teams configuration MACRO_CONFIG_INT(SvTeamStrict, sv_team_strict, 0, 0, 1, CFGFLAG_SERVER, "Kill or not all team if someone left game in team", 4) MACRO_CONFIG_INT(ConnTimeout, conn_timeout, 15, 5, 100, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Network timeout", 4) +MACRO_CONFIG_INT(DbgCGCore, dbg_gcore, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SERVER, "Whether to display the annoying GameCore dbg_msgs or not", 3) #endif diff --git a/src/game/gamecore.cpp b/src/game/gamecore.cpp index 930b6a801..af472cee9 100644 --- a/src/game/gamecore.cpp +++ b/src/game/gamecore.cpp @@ -1,5 +1,6 @@ // copyright (c) 2007 magnus auvinen, see licence.txt for more info #include "gamecore.h" +#include const char *CTuningParams::m_apNames[] = { @@ -242,9 +243,12 @@ void CCharacterCore::Tick(bool UseInput) for(int i = 0; i < MAX_CLIENTS; i++) { CCharacterCore *p = m_pWorld->m_apCharacters[i]; - char aBuf[512]; - str_format(aBuf, sizeof(aBuf), "ThisId = %d Id = %d Team = %d", m_Id, i, m_pTeams->Team(i)); - dbg_msg("GameCore", aBuf); + if(g_Config.m_DbgCGCore) + { + char aBuf[512]; + str_format(aBuf, sizeof(aBuf), "ThisId = %d Id = %d Team = %d", m_Id, i, m_pTeams->Team(i)); + dbg_msg("GameCore", aBuf); + } if(!p || p == this || !m_pTeams->CanCollide(i, m_Id)) continue;