Skip to content

Features on water plots as the original: no trees, the oasis on the water - #90

Merged
bssth merged 2 commits into
bssth:masterfrom
MortenLyhr:fix/features-on-water
Nov 23, 2026
Merged

bssth merged 2 commits into
bssth:masterfrom
MortenLyhr:fix/features-on-water

Conversation

@MortenLyhr

Copy link
Copy Markdown
Contributor

What it changes

Trees. A forest or jungle on a coast or ocean plot (placed by a scenario or the World Builder) drew its trees standing in the water. The original grows no trees there. The features whose art is trees (TILE_ART_TYPE_TREES in CIV4ArtDefines_Feature.xml: the forest and the jungle) are now left out on water plots, and the tree pieces at their corners join up as at a forest's edge. Ice (half tiling), fallout and flood plains still show there, as in the original.

The oasis. On a water plot it stood on the sea floor, its pool and sand rim under the water, so only a few specks showed. The original stands it on the water with its pool and rim over the sea: a water plot's point is at the water's level (CyPlot.getPoint().z 49.5 on water against 64 on flat land). Features that stand in their plot (the oasis; fallout too, not checked against the original) now stand at the water's level on water plots; tiled ones (trees, ice) are as before.

src/render/MapView.cpp only.

Original (Wine) left, OpenCiv4 right:

Trees, before
Trees, after
Oasis, before
Oasis, after (bottom row)

(The OpenCiv4 pictures have #62's camera and #81's water on; the oasis pair also has #81's distance fog.)

How it was checked

  • ctest passes: 13/13 (macOS, Release).
  • Game results unchanged: --turns 100 --map Fractal --size STANDARD --seed 7 gives the same checksum as master on every turn, ending at D7D43800 (drawing only).
  • Original saves still load: not affected, not tested.
  • Compared with the original under Wine on the test map's water rows (coast and ocean × every feature × every resource).

Merging with #77 (fix/land-ice) clashes on one line in buildFeatures' add: keep #77's iceOverLand push and this branch's std::max(ground(...), at.z).

🤖 Generated with Claude Code

MortenLyhr and others added 2 commits November 20, 2026 00:38
A forest or jungle on a coast or ocean plot (a scenario's or the World
Builder's) drew its trees standing in the water. The original grows no
trees there: features whose art is trees (TILE_ART_TYPE_TREES, the forest
and the jungle) aren't drawn on water plots, and the tree pieces at their
corners join up as at a forest's edge. Ice, fallout, the oasis and the
others are drawn as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An oasis on a coast or ocean plot (a scenario's or the World Builder's)
stood on the sea floor, its pool and sand under the water: only a few
specks showed. The original stands it on the water, with its pool and
sand rim over the sea: the plot's point is at the water's level there
(CyPlot.getPoint().z 49.5 on water against 64 on flat land). Features
that stand in their plot (the oasis, fallout) now stand at the water's
level on water plots; the tiled ones (trees, ice) are as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bssth
bssth merged commit 51089c4 into bssth:master Nov 23, 2026
3 checks passed
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.

2 participants