fairland: Replace distance_to_land(), distance_to_sea()
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 Aug 2020 12:01:32 +0000 (14:01 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 19 Jan 2021 07:27:34 +0000 (08:27 +0100)
commitfb2bd2408e1deede64a4b6bdfbe742c6fc42231c
tree6175ba7e4a3167c13a5ba5c2c67c87550429f8bc
parent7f1bbcad94bdb6fe02715ffe70be1b24d61b9766
fairland: Replace distance_to_land(), distance_to_sea()

distance_to_land() searches for closest land sector, and
distance_to_sea() for the closest sea sector.  We already have a more
efficient alternative: the breadth-first search recently added for
spheres of influence can precompute these distances.  Put it to use,
and retire distance_to_land() and distance_to_sea().

distance_to_what() could now be simplified.  Don't bother, because
it'll soon be deleted entirely.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/util/fairland.c