Revert "Permit ships that can drop depth charges, but not fire"
This reverts commit9b0b0dc772
. 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 commit9b0b0dc
(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 commit0757042
. 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>
This commit is contained in:
parent
ac15e5b961
commit
ee3b02c514
1 changed files with 1 additions and 2 deletions
|
@ -170,8 +170,7 @@ multifire(void)
|
|||
pr("Not enough mil on ship #%d\n", item.ship.shp_uid);
|
||||
continue;
|
||||
}
|
||||
if (mchr[item.ship.shp_type].m_glim == 0
|
||||
&& !(mchr[fship.shp_type].m_flags & M_DCH)) {
|
||||
if (mchr[item.ship.shp_type].m_glim == 0) {
|
||||
pr("Ships %d cannot fire guns!\n", item.ship.shp_uid);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue