(MIN_MOBCOST, LND_MINMOBCOST): Just one use, inline and remove.
This commit is contained in:
parent
4e7c993a62
commit
cefe61916c
3 changed files with 2 additions and 4 deletions
|
@ -45,7 +45,6 @@
|
|||
#define N_MAXLAND 30
|
||||
#define LAND_MINEFF 10
|
||||
#define LAND_MINFIREEFF 40 /* arty must be this effic to fire */
|
||||
#define LND_MINMOBCOST 0.200
|
||||
|
||||
struct lndstr {
|
||||
/* initial part must match struct genitem */
|
||||
|
|
|
@ -175,7 +175,6 @@ extern struct dchrstr bigcity_dchr;
|
|||
#define SCT_DEFENSE(sp) \
|
||||
(opt_DEFENSE_INFRA ? (sp)->sct_defense : (sp)->sct_effic)
|
||||
|
||||
#define MIN_MOBCOST 0.001 /* lowest cost a sector can have to move into */
|
||||
#define FORTEFF 5 /* forts must be 5% efficient to fire. */
|
||||
|
||||
#define MOB_MOVE 0
|
||||
|
|
|
@ -66,10 +66,10 @@ sector_mcost(struct sctstr *sp, int mobtype)
|
|||
d = (d * 10.0 - sp->sct_effic) / 115;
|
||||
|
||||
if (mobtype == MOB_MOVE)
|
||||
return MAX(d, MIN_MOBCOST);
|
||||
return MAX(d, 0.001);
|
||||
if (sp->sct_own != sp->sct_oldown && sp->sct_mobil <= 0
|
||||
&& mobtype != MOB_RAIL)
|
||||
return MAX(d, LND_MINMOBCOST);
|
||||
return MAX(d, 0.2);
|
||||
return MAX(d, 0.01);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue