subs: Simplify MOB_ACCESS mobility update
The do_upd_checking recursion guard is superfluous: do_mob_sect() doesn't call anything. Has been that way since MOB_ACCESS was added in Empire 3. Inline the remaining code of sct_do_upd_mob(), shp_do_upd_mob(), pln_do_upd_mob(), lnd_do_upd_mob() in their only callers sct_postread(), shp_postread(), pln_postread(), lnd_postread(). Rename do_mob_sect(), do_mob_ship(), do_mob_plane(), do_mob_land() to mob_sect, mob_ship(), mob_plane(), mob_land() and give them external linkage. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
25d48124d0
commit
dd9e393b38
6 changed files with 46 additions and 113 deletions
|
@ -104,10 +104,10 @@ extern void prod_land(int, int, struct bp *, int);
|
|||
extern int get_materials(struct sctstr *, short[], int);
|
||||
/* mobility.c */
|
||||
extern void mob_inc_all(int);
|
||||
extern void sct_do_upd_mob(struct sctstr *sp);
|
||||
extern void shp_do_upd_mob(struct shpstr *sp);
|
||||
extern void lnd_do_upd_mob(struct lndstr *lp);
|
||||
extern void pln_do_upd_mob(struct plnstr *pp);
|
||||
extern void mob_inc_sect(struct sctstr *, int);
|
||||
extern void mob_inc_ship(struct shpstr *, int);
|
||||
extern void mob_inc_plane(struct plnstr *, int);
|
||||
extern void mob_inc_land(struct lndstr *, int);
|
||||
extern void mob_access_all(void);
|
||||
/* move_sat.c */
|
||||
extern void move_sat(struct plnstr *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue