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
|
@ -877,7 +877,7 @@ shp_missile_defense(coord dx, coord dy, natid bombown, int hardtarget)
|
|||
continue;
|
||||
|
||||
/* now calculate the odds */
|
||||
gun = MIN(ship.shp_item[I_GUN], ship.shp_glim);
|
||||
gun = shp_usable_guns(&ship);
|
||||
eff = ship.shp_effic / 100.0;
|
||||
teff = ship.shp_tech / (ship.shp_tech + 200.0);
|
||||
/* raise 4.5 for better interception -KHS */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue