diff --git a/binaries/data/config/default.cfg b/binaries/data/config/default.cfg index 66828693f1..01acedb7aa 100644 --- a/binaries/data/config/default.cfg +++ b/binaries/data/config/default.cfg @@ -479,6 +479,7 @@ selectformationasone = "true" ; Whether to select formations as a whole by defau icons.enabled = "true" icons.opacity = 1.0 icons.sizescale = 1.0 +entityradiusscale = 1.0 blinkduration = 1.7 ; The blink duration while pinging pingduration = 50.0 ; The duration for which an entity will be pinged after an attack notification diff --git a/source/graphics/MiniMapTexture.cpp b/source/graphics/MiniMapTexture.cpp index f7b7c41ad4..8779a57e5d 100644 --- a/source/graphics/MiniMapTexture.cpp +++ b/source/graphics/MiniMapTexture.cpp @@ -517,11 +517,17 @@ void CMiniMapTexture::RenderFinalTexture( m_LastFinalTextureUpdate = currentTime; m_FinalTextureDirty = false; + CmpPtr cmpRangeManager(m_Simulation, SYSTEM_ENTITY); + ENSURE(cmpRangeManager); + // We might scale entities properly in the vertex shader but it requires // additional space in the vertex buffer. So we assume that we don't need // to change an entity size so often. + // Also compensate circular maps for being rendered closer than square maps. + const float mapGeometryScale{cmpRangeManager->GetLosCircular() ? std::sqrt(2.0f) : 1.0f}; + const float entityRadiusScale{g_ConfigDB.Get("gui.session.minimap.entityradiusscale", 1.0f) / mapGeometryScale }; // Radius with instancing is lower because an entity has a more round shape. - const float entityRadius = static_cast(m_MapSize) / 128.0f * (m_UseInstancing ? 5.0 : 6.0f); + const float entityRadius = static_cast(m_MapSize) / 128.0f * (m_UseInstancing ? 5.0 : 6.0f) * entityRadiusScale; UpdateAndUploadEntities(deviceCommandContext, entityRadius, currentTime);