Factor out ship usable gun calculation into shp_usable_gun()
This commit is contained in:
parent
ffab089c61
commit
4849600cd5
5 changed files with 16 additions and 7 deletions
|
@ -523,8 +523,8 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target)
|
|||
if ((plp->pcp->pl_flags & P_A) && !on_shiplist(shipno, head))
|
||||
continue;
|
||||
|
||||
shell = gun = 0;
|
||||
gun = MIN(ship.shp_item[I_GUN], ship.shp_glim);
|
||||
shell = 0;
|
||||
gun = shp_usable_guns(&ship);
|
||||
if (gun > 0) {
|
||||
shell = ship.shp_item[I_SHELL];
|
||||
if (shell <= 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue