Fix ship interdiction targeting ships not at sea hvy-metal-2.4
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 8 Jun 2008 09:35:04 +0000 (11:35 +0200)
committerMarkus Armbruster <armbru@pike.pond.sub.org>
Tue, 10 Jun 2008 08:25:05 +0000 (10:25 +0200)
commita4b550a1a2d85afbe7d6141ef5f894dad8e1f890
treef5303a78257d428b8ed9368a8a032eeef2fda600
parent07d2c38a7342ccafe568321ff8fa4709cc6fbb61
Fix ship interdiction targeting ships not at sea

perform_mission() needs to know whether it is targeting ships or
something else, because the rules differ: submarines interdict only
ships, land units get their damage reduced when interdicting ships,
and different news are generated.

The old code assumed it was targeting ships when the target sector was
sea.  Wrong when interdicting ships in harbors, bridges and such.
This has always been broken.  Except when checking a submarine's
target: there it tested argument s, which is gross, but at least it
works.  That code was added in v4.0.8.

Replace the broken test by the gross hack everywhere.  This fixes news
and damage from land units when ships get interdicted in non-sea
sectors.
(cherry picked from commit 3e251b474fb90089c15ea8b5ece4c4f74962d0c0)
src/lib/subs/mission.c