(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

@ -1058,8 +1058,8 @@ shp_missdef(struct shpstr *sp, natid victim)
double
shp_mobcost(struct shpstr *sp)
{
double effspd = sp->shp_effic * 0.01 * sp->shp_speed;
return 480.0 / (effspd + techfact(sp->shp_tech, effspd));
return speed_factor(sp->shp_effic * 0.01 * sp->shp_speed,
sp->shp_tech);
}
/*