(get_empobj_mob_max): New. Return maximum mobility based on ef_type.
(miss): Use new get_empobj_mob_max().
This commit is contained in:
parent
6db2e6ec63
commit
b70653815c
3 changed files with 21 additions and 13 deletions
|
@ -178,20 +178,8 @@ mission(void)
|
|||
desired_radius = 9999;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case EF_SHIP:
|
||||
mobmax = ship_mob_max;
|
||||
break;
|
||||
case EF_LAND:
|
||||
mobmax = land_mob_max;
|
||||
break;
|
||||
case EF_PLANE:
|
||||
mobmax = plane_mob_max;
|
||||
break;
|
||||
default:
|
||||
CANT_HAPPEN("bad TYPE");
|
||||
if ((mobmax = get_empobj_mob_max(type)) == -1)
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
||||
mobused = ldround(mission_mob_cost * (double)mobmax, 1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue