From 09e44577a58db96af09b2ea6e314962de4195e48 Mon Sep 17 00:00:00 2001 From: Alfredo Tupone Date: Thu, 17 Oct 2024 18:35:13 +0200 Subject: [PATCH] Check if flag size changes --- src/bzflag/RadarRenderer.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bzflag/RadarRenderer.cxx b/src/bzflag/RadarRenderer.cxx index cb54047a43..b73edf88c4 100644 --- a/src/bzflag/RadarRenderer.cxx +++ b/src/bzflag/RadarRenderer.cxx @@ -605,10 +605,18 @@ void RadarRenderer::render(SceneRenderer& renderer, bool blank, bool observer) // draw them in reverse order so that the team flags // (which come first), are drawn on top of the normal flags. GLfloat s = BZDBCache::flagRadius > 3.0f * ps ? BZDBCache::flagRadius : 3.0f * ps; + const int maxFlags = world->getMaxFlags(); bool flagsToBeUpdated = world->areFlagsUpdated(); + static GLfloat oldSize = -1.0f; + if (s != oldSize) + { + oldSize = s; + flagsToBeUpdated = true; + } + static bool drawNormalFlags = true; if (drawNormalFlags != BZDB.isTrue("displayRadarFlags")) {