(produce_sect): Unless player->simulation, work directly on item
arrays instead of copies made by getvec(). This is safe, because the old code made single copies and always flushed them back into the unit structures. Else make copies by hand, not with getvec. (starv_sects): Replace getvec() by direct, read-only item access. (upd_buildeff, enlist, materials_charge, materials_cost, produce, grow_people, growfood, trunc_people, do_feed, feed_people): Change argument type to match uncopied item arrays. (growfood): Obey ITEM_MAX.
This commit is contained in:
parent
61d57719c2
commit
b62aca0ecd
5 changed files with 36 additions and 52 deletions
|
@ -551,8 +551,8 @@ extern int dodistribute(struct sctstr *, int, s_char *, double, double);
|
|||
extern void finish_sects(int);
|
||||
/* human.c */
|
||||
extern int do_feed(register struct sctstr *, register struct natstr *,
|
||||
int *, int *, int *, int);
|
||||
extern int feed_people(register int *, int, int *);
|
||||
short *, int *, int *, int);
|
||||
extern int feed_people(short *, int, int *);
|
||||
/* land.c */
|
||||
extern int prod_land(int, int, int *, int);
|
||||
extern int feed_land(struct lndstr *, int, int *, int);
|
||||
|
@ -605,7 +605,7 @@ extern int upd_slmilcosts(natid, int);
|
|||
extern void prepare_sects(int, int *);
|
||||
extern int bank_income(struct sctstr *, int);
|
||||
/* produce.c */
|
||||
extern int produce(struct natstr *, struct sctstr *, int *, int, int,
|
||||
extern int produce(struct natstr *, struct sctstr *, short *, int, int,
|
||||
int, int *, int *);
|
||||
/* removewants.c */
|
||||
extern int update_removewants(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue