]> git.pond.sub.org Git - empserver/commit
Revert "Permit ships that can drop depth charges, but not fire"
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 8 Feb 2015 11:38:55 +0000 (12:38 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 2 Mar 2015 07:20:52 +0000 (08:20 +0100)
commitee3b02c514b1410fa60f317d26a73ae813d2005c
treeb6107f8839e18a0d5c693f28f19ccc15c143bc95
parentac15e5b96111314d2c712f06a44d945ff0c4593e
Revert "Permit ships that can drop depth charges, but not fire"

This reverts commit 9b0b0dc7729b7fadc09d5769cc1128341b3c3d33.

The fire command drops depth charges when the target is a submarine in
range and firing ship has the capability.  Else, it blindly fires
guns.  It used to reject ships that can't use guns, even when they
could use depth charges, but commit 9b0b0dc (v4.3.31) lifted that
restruction.  No such ships exist in the stock game.

If the firing ship can't fire guns, shp_fire() returns -1, triggering
an oops.  Broken in commit 0757042.

Avoiding dependence of depth charge on gun fire capability is
pleasing, but nevertheless a bad idea without test coverage.  Creating
the necessary tests isn't worth it, so put back the traditional
restriction instead.

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