]> git.pond.sub.org Git - empserver/commit
fairland: Tweak rural elevations for simplicity
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 19 Aug 2020 11:31:09 +0000 (13:31 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 17 Jan 2021 20:24:28 +0000 (21:24 +0100)
commit2105ed3fa1cab3e9e7cec732b17e598264d5b6e0
tree8d850f131b06c9ac8c3cfb1374b0e84fb62dabac
parent7a3af61016a2f81319c1d50d25721ad0ebc3a333
fairland: Tweak rural elevations for simplicity

elevate_land() computes the sequence of elevations 97, 97 - delta,
... in fixed point with a scaling factor of 100.  Switch to
floating-point, because it's simpler.  Elevations (and thus resources)
change slightly due to reduced rounding errors.

Note that we map elevations less than 1 to 1 both before and after the
patch.  Odd.  Turns out this mitigates a bug: mountain placement can
place fewer mountains than it should, and when that happens,
elevations go below 1 here.  The next commit will fix this.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/util/fairland.c
tests/fairland/no-spike.xdump
tests/fairland/plain.xdump
tests/fairland/spike.xdump
tests/fairland/stunted.xdump