]> git.pond.sub.org Git - empserver/commit
plnsub: Make takeoff/landing in mountains consistent
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 17 May 2016 20:03:40 +0000 (22:03 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 12:03:21 +0000 (14:03 +0200)
commit6157b6cbe4ef763e710b2cf43603cb89bc4b23f8
treefd2c23bfefd25df2d1223ec20cb4b399c5d01e73
parent3f2f201ddb1e9492d4fc06982f90b1c0fcdff888
plnsub: Make takeoff/landing in mountains consistent

One-way sorties (fly, recon and sweep) reject mountain destinations
with a "Nowhere to land" message.  However, planes can land there just
fine when they return to base (bomb, drop, paradrop, missions).
Already inconsistent in BSD Empire 1.1.

Fix the inconsistency by changing pln_where_to_land() to permit only
helicopters to land in mountains, and pln_airbase_ok() to permit only
helicopters and missiles to take off there, i.e. reject fixed-wing
aircraft.

The flying commands now reject fixed-wing planes based in mountains
with an "is in a mountain and can't take off" message.

Commands flying to a mountain now select only helicopters and silently
ignore the rest, exactly like they select only VTOL planes for flying
to a non-airfield.  If no planes can be selected, the command fails
with a "No planes could be equipped" message.  This is admittedly less
clear than the "Nowhere to land" message we got before.

Missions now ignore fixed-wing planes based in mountains, exactly like
they ignore non-VTOL planes outside airfields.  This may make players
wonder why the fixed-wing VTOL planes they transported up that
mountain don't obey missions.  Missions are always quiet unless they
execute.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/subs/plnsub.c