(shp_missile_defense): Move big assignment out of if condition for

clarity.
This commit is contained in:
Markus Armbruster 2004-03-01 14:21:11 +00:00
parent b8c9d6a029
commit f72281b773

View file

@ -956,9 +956,10 @@ shp_missile_defense(coord dx, coord dy, natid bombown, int hardtarget)
if (vec[I_MILIT] < 1) /* do we have mil? */ if (vec[I_MILIT] < 1) /* do we have mil? */
continue; continue;
if (vec[I_SHELL] < 2) { /* do we need shells */ if (vec[I_SHELL] < 2) { /* do we need shells */
if (vec[I_SHELL] += supply_commod(ship.shp_own, vec[I_SHELL] += supply_commod(ship.shp_own,
ship.shp_x, ship.shp_x, ship.shp_y,
ship.shp_y, I_SHELL, 2) < 2) I_SHELL, 2);
if (vec[I_SHELL] < 2)
continue; continue;
} }
if (vec[I_GUN] < 1) /* we need at least 1 gun */ if (vec[I_GUN] < 1) /* we need at least 1 gun */