]> 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>
Tue, 19 Jan 2021 07:27:34 +0000 (08:27 +0100)
commitdd9bda62eb0d1e3d46d85b777ba544d5687ae357
tree39fb2c11f3098d319ae1b1d61868dd6de49bcb33
parent7ce7440a340bb5050055be0e0b56bdfbcbea9f4e
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