diff --git a/src/engine/shared/config_variables.h b/src/engine/shared/config_variables.h index dec85b3f8d3..178c1b3ef4b 100644 --- a/src/engine/shared/config_variables.h +++ b/src/engine/shared/config_variables.h @@ -44,6 +44,9 @@ MACRO_CONFIG_INT(ClNamePlatesStrongSize, cl_nameplates_strong_size, 30, -50, 100 MACRO_CONFIG_INT(ClAfkEmote, cl_afk_emote, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show zzz emote next to afk players") MACRO_CONFIG_INT(ClTextEntities, cl_text_entities, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Render textual entity data") MACRO_CONFIG_INT(ClTextEntitiesSize, cl_text_entities_size, 100, 1, 100, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Size of textual entity data from 1 to 100%") +MACRO_CONFIG_INT(ClTextEntitiesSpeedBoost, cl_text_entities_speed_boost, 1, 0, 3, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Render textual speedup data (0 - off, 1 - Force, 2 - MaxSpeed, 3 - Force + MaxSpeed)") +MACRO_CONFIG_INT(ClTextEntitiesTeleport, cl_text_entities_teleport, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Render textual speedup data (0 - off, 1 - Teleporter numbers)") +MACRO_CONFIG_INT(ClTextEntitiesSwitch, cl_text_entities_switch, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Render textual switch data (0 - off, 1 - Switch numbers)") MACRO_CONFIG_INT(ClStreamerMode, cl_streamer_mode, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Censor sensitive information such as /save password") MACRO_CONFIG_COL(ClAuthedPlayerColor, cl_authed_player_color, 5898211, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Color of name of authenticated player in scoreboard") diff --git a/src/game/client/components/maplayers.cpp b/src/game/client/components/maplayers.cpp index 2a4680a8b53..0cf939427df 100644 --- a/src/game/client/components/maplayers.cpp +++ b/src/game/client/components/maplayers.cpp @@ -1691,7 +1691,7 @@ void CMapLayers::OnRender() { Graphics()->BlendNormal(); RenderTileLayer(TileLayerCounter - 3, Color); - if(g_Config.m_ClTextEntities) + if(g_Config.m_ClTextEntities && g_Config.m_ClTextEntitiesSwitch) { Graphics()->TextureSet(m_pImages->GetOverlayTop()); RenderTileLayer(TileLayerCounter - 2, Color); @@ -1761,7 +1761,7 @@ void CMapLayers::OnRender() RenderTileLayer(TileLayerCounter - 3, Color); Graphics()->WrapNormal(); - if(g_Config.m_ClTextEntities) + if(g_Config.m_ClTextEntities && g_Config.m_ClTextEntitiesSpeedBoost) { Graphics()->TextureSet(m_pImages->GetOverlayBottom()); RenderTileLayer(TileLayerCounter - 2, Color); diff --git a/src/game/client/render_map.cpp b/src/game/client/render_map.cpp index 0f5d0b09a68..35bdd4dcc68 100644 --- a/src/game/client/render_map.cpp +++ b/src/game/client/render_map.cpp @@ -726,7 +726,7 @@ void CRenderTools::RenderTile(int x, int y, unsigned char Index, float Scale, Co void CRenderTools::RenderTeleOverlay(CTeleTile *pTele, int w, int h, float Scale, float Alpha) const { - if(!g_Config.m_ClTextEntities) + if(!g_Config.m_ClTextEntities || !g_Config.m_ClTextEntitiesTeleport) return; float ScreenX0, ScreenY0, ScreenX1, ScreenY1; @@ -831,9 +831,12 @@ void CRenderTools::RenderSpeedupOverlay(CSpeedupTile *pSpeedup, int w, int h, fl // draw force and max speed if(g_Config.m_ClTextEntities) { - str_format(aBuf, sizeof(aBuf), "%d", Force); - TextRender()->Text(mx * Scale, (my + 0.5f + ToCenterOffset / 2) * Scale, Size * Scale / 2.f, aBuf); - if(MaxSpeed) + if(g_Config.m_ClTextEntitiesSpeedBoost & 1) + { + str_format(aBuf, sizeof(aBuf), "%d", Force); + TextRender()->Text(mx * Scale, (my + 0.5f + ToCenterOffset / 2) * Scale, Size * Scale / 2.f, aBuf); + } + if(MaxSpeed && g_Config.m_ClTextEntitiesSpeedBoost & 2) { str_format(aBuf, sizeof(aBuf), "%d", MaxSpeed); TextRender()->Text(mx * Scale, (my + ToCenterOffset / 2) * Scale, Size * Scale / 2.f, aBuf); @@ -848,7 +851,7 @@ void CRenderTools::RenderSpeedupOverlay(CSpeedupTile *pSpeedup, int w, int h, fl void CRenderTools::RenderSwitchOverlay(CSwitchTile *pSwitch, int w, int h, float Scale, float Alpha) const { - if(!g_Config.m_ClTextEntities) + if(!g_Config.m_ClTextEntities || !g_Config.m_ClTextEntitiesSwitch) return; float ScreenX0, ScreenY0, ScreenX1, ScreenY1;