update: Rearrange code to pay non-sector military

Split upd_slmilcosts() into prep_ships() and prep_lands().  Move the
sanity check for dead ships and land units from prod_ships() and
prod_lands() there.  Move their call from prepare_sects() to its
caller, along with pay_reserve().

Create prep_planes() for symmetry.  Pilots are now paid at the same
time as other military.  Can matter only when the country goes broke
during the update.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-06-22 20:49:57 +02:00
parent 7951e91e3f
commit 5df43a5b3f
7 changed files with 88 additions and 59 deletions

View file

@ -163,7 +163,9 @@ calc_all(void)
bank_income(sp, etu);
}
}
upd_slmilcosts(etu, player->cnum);
prep_ships(etu, player->cnum);
prep_planes(etu, player->cnum);
prep_lands(etu, player->cnum);
pay_reserve(np, etu);
/* Maintain ships, planes and land units */