(lnd_pathcost): New, factored out of lnd_mobcost().

(att_reacting_units): Use it.  Fixes overcharging of inefficient
units.  Broken when Empire3 changed land unit mobility use not to
depend on efficiency, except for supply units.
(lnd_sweep): Use it.  No functional change.

(speed_factor): New, factored out of lnd_pathcost() and shp_mobcost().
This commit is contained in:
Markus Armbruster 2006-06-08 20:43:13 +00:00
parent 5e66e5bdee
commit 55ff194f7f
6 changed files with 27 additions and 24 deletions

View file

@ -200,6 +200,7 @@ extern void lnd_sweep(struct emp_qelem *, int, int, natid);
extern int lnd_interdict(struct emp_qelem *, coord, coord, natid);
extern void lnd_sel(struct nstr_item *, struct emp_qelem *);
extern int lnd_check_mines(struct emp_qelem *);
extern double lnd_pathcost(struct lndstr *, double);
extern double lnd_mobcost(struct lndstr *, struct sctstr *, int);
extern char *lnd_path(int, struct lndstr *, char *);