extern void finish_sects(int);
/* human.c */
extern int new_work(struct sctstr *, int);
-extern int do_feed(struct sctstr *, struct natstr *, int *, int);
+extern int do_feed(struct sctstr *, struct natstr *, int);
extern int feed_people(short *, int);
extern double food_needed(short *, int);
extern int famine_victims(short *, int);
* feed the individual sector
*/
int
-do_feed(struct sctstr *sp, struct natstr *np, int *workp, int etu)
+do_feed(struct sctstr *sp, struct natstr *np, int etu)
{
int work_avail;
int starved, sctwork;
sp->sct_item[I_FOOD] = 0;
} else
sctwork = 100;
+
/* Here is where we truncate extra people, always */
trunc_people(sp, np);
- *workp = work_avail;
- if (!player->simulation)
- sp->sct_work = sctwork;
- return sctwork;
+ sp->sct_work = sctwork;
+ return work_avail;
}
int
}
sp->sct_updated = 1;
- work = 0;
- do_feed(sp, np, &work, etu);
+ work = do_feed(sp, np, etu);
bp_put_items(bp, sp);
if (sp->sct_off || np->nat_money < 0)
bp_put_items(bp, sp);
}
+ sp->sct_avail = work;
bp_put_avail(bp, sp, work);
p_sect[desig][0] += amount;
p_sect[desig][1] += pcost;
- if (!player->simulation) {
- sp->sct_avail = work;
+ if (!player->simulation)
np->nat_money -= pcost;
- }
}
}