diff --git a/src/render/MapView.cpp b/src/render/MapView.cpp index bae1b955..456c64d4 100644 --- a/src/render/MapView.cpp +++ b/src/render/MapView.cpp @@ -4923,9 +4923,9 @@ float4 PSWater(WaterOut i) : SV_Target // (the selection rings under the units: the figures on them cover them) m->ringsDrawn = m->drawRings(); m->drawInstances(m->units, frustum, true); - if (options.flags) + if (options.flags && !options.battleZoom) m->drawFlags(frustum); - if (options.flags && options.healthBars && m->renderer.camera().distance > m->map.cameraMinDistance + 0.5f && + if (options.flags && !options.battleZoom && options.healthBars && m->renderer.camera().distance > m->map.cameraMinDistance + 0.5f && m->renderer.camera().distance < 22 * m->S()) m->drawHealthBars(frustum); } @@ -4999,7 +4999,8 @@ float4 PSWater(WaterOut i) : SV_Target return x > -50 && x < W + 50 && y > -50 && y < H + 50; }; // The units' flags: the visible owner's decal and colours, health, and stack count. - if (options.flags && options.units && distance < 22 && m->renderer.camera().distance > m->map.cameraMinDistance + 0.5f) + // (none while the camera is in close over a battle: Combat Zoom, as drawFlags) + if (options.flags && !options.battleZoom && options.units && distance < 22 && m->renderer.camera().distance > m->map.cameraMinDistance + 0.5f) for (const UnitView& u : m->map.units) { const int plot = u.x + u.y * m->map.width; diff --git a/src/render/MapView.h b/src/render/MapView.h index 4dabad46..93307008 100644 --- a/src/render/MapView.h +++ b/src/render/MapView.h @@ -34,6 +34,10 @@ namespace oc4::render // A city's screen is up: as the original, no units (nor their flags and health) and no // city bars on the map; the cities, signs and plots stay. bool cityScreen = false; + // The camera is in close over a battle (Combat Zoom): as the original, no unit's flag nor + // health bar anywhere on the map until it backs out (seen in Wine; without Combat Zoom + // only the fighters' plots lose theirs). + bool battleZoom = false; }; MapView(Renderer& renderer, const AssetResolver& assets); diff --git a/src/render/MapWindow.cpp b/src/render/MapWindow.cpp index 0ba01cd3..325ec389 100644 --- a/src/render/MapWindow.cpp +++ b/src/render/MapWindow.cpp @@ -1681,6 +1681,7 @@ namespace oc4::render // (beyond the map: black as the ground not seen, until the team's map is centred) renderer->beginFrame(camera, view->seenBounds() ? Vec3{ 0, 0, 0 } : Vec3{ 0.05f, 0.07f, 0.10f }); view->options.cityScreen = cityView; + view->options.battleZoom = battleView; view->draw(); renderer->endFrame(); syncHeads();