diff --git a/src/game/client/components/maplayers.cpp b/src/game/client/components/maplayers.cpp index 62b32a1f2..2ffe92b07 100644 --- a/src/game/client/components/maplayers.cpp +++ b/src/game/client/components/maplayers.cpp @@ -126,7 +126,7 @@ void CMapLayers::OnRender() Render = true; } - if(pLayer->m_Type == LAYERTYPE_TILES && Input()->KeyPressed(KEY_KP0)) + if(pLayer->m_Type == LAYERTYPE_TILES && Input()->KeyPressed(KEY_KP0) && g_Config.m_DbgLayers)//This is what caused the client to lag when kp0 is pressed ingame also caused crashes on linux { CMapItemLayerTilemap *pTMap = (CMapItemLayerTilemap *)pLayer; CTile *pTiles = (CTile *)m_pLayers->Map()->GetData(pTMap->m_Data); diff --git a/src/game/variables.h b/src/game/variables.h index 6a247671b..7f4700dc6 100644 --- a/src/game/variables.h +++ b/src/game/variables.h @@ -74,6 +74,7 @@ MACRO_CONFIG_INT(SvVoteTimelimit, sv_vote_timelimit, 0, 0, 1, CFGFLAG_SERVER, "A MACRO_CONFIG_INT(DbgDummies, dbg_dummies, 0, 0, 15, CFGFLAG_SERVER, "") #endif +MACRO_CONFIG_INT(DbgLayers, dbg_layers, 0, 0, 1, CFGFLAG_CLIENT, "") MACRO_CONFIG_INT(DbgFocus, dbg_focus, 0, 0, 1, CFGFLAG_CLIENT, "") MACRO_CONFIG_INT(DbgTuning, dbg_tuning, 0, 0, 1, CFGFLAG_CLIENT, "") #endif