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>
Sun, 17 Jan 2021 20:24:28 +0000 (21:24 +0100)
commit51bf9f78224001ae12aaabc41f56e01799b1c984
tree55a5fc5a850322cfd580a2189176d6c3c1a117c4
parent60a89a83c7e3b514f1475ce3263f5df4217f9a32
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