update: Drop unnecessary "not simulation" guards
Since changing *sp is safe now, we can update sp->sct_work, sp->sct_loyal, sp->sct-che unconditionally in do_feed(), and likewise sp->sct_item and sp's resource in produce(). Output of budget in smoke test and update test changes slightly, because it now executes more code, and the PRNs this consumes affect random rounding. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
157892b449
commit
1c0ff91e62
3 changed files with 20 additions and 23 deletions
|
@ -91,8 +91,8 @@ do_feed(struct sctstr *sp, struct natstr *np, int *workp, int etu)
|
|||
if (starved > 25)
|
||||
nreport(sp->sct_own, N_DIE_FAMINE, 0, 1);
|
||||
}
|
||||
sp->sct_loyal += roll(8) + 1;
|
||||
}
|
||||
sp->sct_loyal += roll(8) + 1;
|
||||
sctwork = 0;
|
||||
} else {
|
||||
sctwork = sp->sct_work;
|
||||
|
@ -109,8 +109,7 @@ do_feed(struct sctstr *sp, struct natstr *np, int *workp, int etu)
|
|||
maxworkers));
|
||||
/* FIXME restores work charged for growfood() */
|
||||
/* age che */
|
||||
if (!player->simulation)
|
||||
sp->sct_che = age_people(sp->sct_che, etu);
|
||||
sp->sct_che = age_people(sp->sct_che, etu);
|
||||
}
|
||||
if (manna)
|
||||
/* Take away food we conjured up */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue