Skip to content

No unit flags while Combat Zoom is in on a battle - #172

Open
MortenLyhr wants to merge 1 commit into
bssth:masterfrom
MortenLyhr:fix/combat-zoom-flags
Open

MortenLyhr wants to merge 1 commit into
bssth:masterfrom
MortenLyhr:fix/combat-zoom-flags

Conversation

@MortenLyhr

@MortenLyhr MortenLyhr commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Clean room (#181): checked on 2026-11-25 against #181's clean-room rules and guides (CONTRIBUTING.md "Clean room", AGENTS.md). This PR was written before #181; its sources are below, in #181's terms.

What it is based on: a Combat Zoom battle filmed in the original under Wine (BtS 3.19, BUG + BULL), and the SDK's CAMERALOOKAT_BATTLE_ZOOM_IN.

  • clean room: neither I nor any tool or AI agent I used looked inside the original game's executables or libraries (no disassembly, decompiling, debugging, strings), and nothing here comes from someone else's (CONTRIBUTING)

With Combat Zoom on, the original shows no unit flag anywhere on the screen while the camera is in close over a fight. OpenCiv4 hid only the fighters' flags and kept every other plot's flags and health bars.

What the original does (seen in Wine, BtS 3.19 with BUG + BULL, backlog #98's batch 3: an axeman attacks an archer stacked with two warriors, with bystander stacks on both sides):

  • Combat Zoom off: only the two fighting plots lose their flags during the fight. The other plots keep theirs. OpenCiv4 already does the same.
  • Combat Zoom on: from the moment the camera goes in until it backs out, no flag is on screen, the bystanders' included. The flags are back once the camera is out.

OpenCiv4 already zooms for a fight. The game core asks for CAMERALOOKAT_BATTLE_ZOOM_IN on the active player's attack, and MapWindow::enterBattleView takes the camera in until releaseLockedCamera. (A scripted --look camera holds still unless OC4_FOLLOW_CAMERA=1, which is why batch 3's OpenCiv4 run did not zoom.)

The change: MapView::Options::battleZoom follows MapWindow's battle view each frame, as cityScreen follows the city view. While it is on, nothing of the units' flags is drawn: no 3D flags (drawFlags), no health bars (drawHealthBars), and none of the overlay's flat emblems (the overlay's fallback for a plot without a 3D flag, which would otherwise show up once drawFlags stops).

Checks: ctest 15/15; sync checksums --turns 100 --map Fractal --size STANDARD --seed 7 equal master's (D7D43800).

Pictures:

Wine with Combat Zoom on (film, t = 14.5, 16, 18, 20.5, 23, 25 s): flags before the fight, none while the camera is in, flags again after:
wine

Before this change, Wine (left) vs. OpenCiv4 (right) during the fight, Combat Zoom on:
zoom before

Combat Zoom off, Wine vs. OpenCiv4 (already the same):
nozoom

OpenCiv4, the camera gliding in for a fight with bystanders round it, frames 0.5 s apart (top: before, bystanders' flags and bars shown; bottom: after, none while the camera is in):
oc4

Open: Wine doesn't separate whether the zoom itself or the fight hides the flags (they go together in the original). OpenCiv4 ties it to the battle view, which starts and ends with the zoom.

Merge notes

🤖 Generated with Claude Code

Seen in Wine (BtS + BUG/BULL, backlog bssth#98, batch 3 film combat.mov):
with Combat Zoom on, while the camera is in close over a fight, the
original shows no unit flag anywhere on the screen, the bystanders' too;
with it off only the two fighting plots lose theirs, which OpenCiv4
already did. OpenCiv4 kept the other plots' flags and health bars.

MapView::Options::battleZoom follows MapWindow's battle view
(CAMERALOOKAT_BATTLE_ZOOM_IN, until the core lets go of the camera);
while it is on, no 3D flags, health bars, or the overlay's flat emblems
(the overlay's fallback for a plot without a 3D flag) are drawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant