3147: Clamp font size to atleast 2 (fixes #3145) r=def- a=Jupeyy

We dont need to `close` #3146
i think setting it to 0 makes no sense anyway the config to disable entities text is `cl_text_entities` not this one

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
This commit is contained in:
bors[bot] 2020-10-19 12:23:46 +00:00 committed by GitHub
commit e002ab118a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -465,6 +465,7 @@ void CMapImages::UpdateEntityLayerText(void *pTexBuffer, int ImageColorChannelCo
void CMapImages::InitOverlayTextures() void CMapImages::InitOverlayTextures()
{ {
int TextureSize = 64 * m_TextureScale / 100; int TextureSize = 64 * m_TextureScale / 100;
TextureSize = clamp(TextureSize, 2, 64);
int TextureToVerticalCenterOffset = (64 - TextureSize) / 2; // should be used to move texture to the center of 64 pixels area int TextureToVerticalCenterOffset = (64 - TextureSize) / 2; // should be used to move texture to the center of 64 pixels area
if(m_OverlayBottomTexture == -1) if(m_OverlayBottomTexture == -1)