(MIN_MOBCOST, LND_MINMOBCOST): Just one use, inline and remove.

This commit is contained in:
Markus Armbruster 2006-06-13 21:21:02 +00:00
parent 4e7c993a62
commit cefe61916c
3 changed files with 2 additions and 4 deletions

View file

@ -45,7 +45,6 @@
#define N_MAXLAND 30 #define N_MAXLAND 30
#define LAND_MINEFF 10 #define LAND_MINEFF 10
#define LAND_MINFIREEFF 40 /* arty must be this effic to fire */ #define LAND_MINFIREEFF 40 /* arty must be this effic to fire */
#define LND_MINMOBCOST 0.200
struct lndstr { struct lndstr {
/* initial part must match struct genitem */ /* initial part must match struct genitem */

View file

@ -175,7 +175,6 @@ extern struct dchrstr bigcity_dchr;
#define SCT_DEFENSE(sp) \ #define SCT_DEFENSE(sp) \
(opt_DEFENSE_INFRA ? (sp)->sct_defense : (sp)->sct_effic) (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 FORTEFF 5 /* forts must be 5% efficient to fire. */
#define MOB_MOVE 0 #define MOB_MOVE 0

View file

@ -66,10 +66,10 @@ sector_mcost(struct sctstr *sp, int mobtype)
d = (d * 10.0 - sp->sct_effic) / 115; d = (d * 10.0 - sp->sct_effic) / 115;
if (mobtype == MOB_MOVE) 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 if (sp->sct_own != sp->sct_oldown && sp->sct_mobil <= 0
&& mobtype != MOB_RAIL) && mobtype != MOB_RAIL)
return MAX(d, LND_MINMOBCOST); return MAX(d, 0.2);
return MAX(d, 0.01); return MAX(d, 0.01);
} }