(shp_missile_defense): Move big assignment out of if condition for
clarity.
This commit is contained in:
parent
b8c9d6a029
commit
f72281b773
1 changed files with 4 additions and 3 deletions
|
@ -956,9 +956,10 @@ shp_missile_defense(coord dx, coord dy, natid bombown, int hardtarget)
|
|||
if (vec[I_MILIT] < 1) /* do we have mil? */
|
||||
continue;
|
||||
if (vec[I_SHELL] < 2) { /* do we need shells */
|
||||
if (vec[I_SHELL] += supply_commod(ship.shp_own,
|
||||
ship.shp_x,
|
||||
ship.shp_y, I_SHELL, 2) < 2)
|
||||
vec[I_SHELL] += supply_commod(ship.shp_own,
|
||||
ship.shp_x, ship.shp_y,
|
||||
I_SHELL, 2);
|
||||
if (vec[I_SHELL] < 2)
|
||||
continue;
|
||||
}
|
||||
if (vec[I_GUN] < 1) /* we need at least 1 gun */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue