(nullify_objects): Patch intrchr[] according to opt_NO_LCMS,
opt_NO_HCMS. This fixes output of `show se b', which used not to reflect these options. (improve): Simplify.
This commit is contained in:
parent
b30f4e7591
commit
b19c2a6c03
2 changed files with 8 additions and 8 deletions
|
@ -112,8 +112,6 @@ improve(void)
|
|||
if (!maxup)
|
||||
continue;
|
||||
lneeded = intrchr[type].in_lcms * maxup;
|
||||
if (opt_NO_LCMS)
|
||||
lneeded = 0;
|
||||
if (sect.sct_item[I_LCM] < lneeded) {
|
||||
lneeded = sect.sct_item[I_LCM];
|
||||
maxup = lneeded / intrchr[type].in_lcms;
|
||||
|
@ -124,8 +122,6 @@ improve(void)
|
|||
}
|
||||
}
|
||||
hneeded = intrchr[type].in_hcms * maxup;
|
||||
if (opt_NO_HCMS)
|
||||
hneeded = 0;
|
||||
if (sect.sct_item[I_HCM] < hneeded) {
|
||||
hneeded = sect.sct_item[I_HCM];
|
||||
maxup = hneeded / intrchr[type].in_hcms;
|
||||
|
@ -168,9 +164,7 @@ improve(void)
|
|||
mneeded = intrchr[type].in_mcost * maxup;
|
||||
dneeded = intrchr[type].in_dcost * maxup;
|
||||
player->dolcost += dneeded;
|
||||
if (!opt_NO_LCMS)
|
||||
sect.sct_item[I_LCM] -= lneeded;
|
||||
if (!opt_NO_HCMS)
|
||||
sect.sct_item[I_HCM] -= hneeded;
|
||||
sect.sct_mobil -= mneeded;
|
||||
ovalue = value;
|
||||
|
|
|
@ -543,6 +543,12 @@ nullify_objects(void)
|
|||
pchr[i].p_camt[j] = 0;
|
||||
}
|
||||
}
|
||||
for (i = 0; intrchr[i].in_name; i++) {
|
||||
if (opt_NO_HCMS)
|
||||
intrchr[i].in_hcms = 0;
|
||||
if (opt_NO_LCMS)
|
||||
intrchr[i].in_lcms = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue