(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
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include "empobj.h"
|
||||
#include "file.h"
|
||||
#include "optlist.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
char *
|
||||
|
@ -101,3 +102,21 @@ get_empobj_chr(struct empobj *gp)
|
|||
}
|
||||
return cp;
|
||||
}
|
||||
|
||||
int
|
||||
get_empobj_mob_max(int ef_type)
|
||||
{
|
||||
switch (ef_type) {
|
||||
case EF_SHIP:
|
||||
return ship_mob_max;
|
||||
case EF_LAND:
|
||||
return land_mob_max;
|
||||
case EF_PLANE:
|
||||
return plane_mob_max;
|
||||
case EF_SECTOR:
|
||||
return sect_mob_max;
|
||||
default:
|
||||
CANT_REACH();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue