(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:
parent
5e66e5bdee
commit
55ff194f7f
6 changed files with 27 additions and 24 deletions
|
@ -73,3 +73,9 @@ sector_mcost(struct sctstr *sp, int do_bonus)
|
|||
return MAX(d, LND_MINMOBCOST);
|
||||
return MAX(d, 0.01);
|
||||
}
|
||||
|
||||
double
|
||||
speed_factor(double effspd, int tech)
|
||||
{
|
||||
return 480.0 / (effspd + techfact(tech, effspd));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue