update: Clean up upd_slmilcosts()
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
42bb66038c
commit
35d2671c71
1 changed files with 11 additions and 11 deletions
|
@ -132,24 +132,24 @@ upd_slmilcosts(natid n, int etu)
|
||||||
{
|
{
|
||||||
struct shpstr *sp;
|
struct shpstr *sp;
|
||||||
struct lndstr *lp;
|
struct lndstr *lp;
|
||||||
int mil = 0;
|
int mil, i;
|
||||||
int totalmil = 0;
|
int mil_pay;
|
||||||
int mil_pay = 0;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; NULL != (sp = getshipp(i)); i++) {
|
mil = 0;
|
||||||
|
|
||||||
|
for (i = 0; (sp = getshipp(i)); i++) {
|
||||||
if (!sp->shp_own || sp->shp_own != n)
|
if (!sp->shp_own || sp->shp_own != n)
|
||||||
continue;
|
continue;
|
||||||
if ((mil = sp->shp_item[I_MILIT]) > 0)
|
mil += sp->shp_item[I_MILIT];
|
||||||
totalmil += mil;
|
|
||||||
}
|
}
|
||||||
for (i = 0; NULL != (lp = getlandp(i)); i++) {
|
|
||||||
|
for (i = 0; (lp = getlandp(i)); i++) {
|
||||||
if (!lp->lnd_own || lp->lnd_own != n)
|
if (!lp->lnd_own || lp->lnd_own != n)
|
||||||
continue;
|
continue;
|
||||||
if ((mil = lp->lnd_item[I_MILIT]) > 0)
|
mil += lp->lnd_item[I_MILIT];
|
||||||
totalmil += mil;
|
|
||||||
}
|
}
|
||||||
mil_pay = totalmil * etu * money_mil;
|
|
||||||
|
mil_pay = mil * etu * money_mil;
|
||||||
return mil_pay;
|
return mil_pay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue