(radar): New, moved functionality from rada() except ef_type determination.
(rada): Call radar() with EF_SHIP. (lrad): New, call radar() with EF_LAND. (empmod[]): Call lrad() for lradar command. (march, navi): Call radar() with appropriate type.
This commit is contained in:
parent
ed88f3140d
commit
a9a9957a27
5 changed files with 16 additions and 7 deletions
|
@ -38,8 +38,18 @@
|
|||
#include "optlist.h"
|
||||
#include "empobj.h"
|
||||
|
||||
int rada(void)
|
||||
{
|
||||
return radar(EF_SHIP);
|
||||
}
|
||||
|
||||
int lrad(void)
|
||||
{
|
||||
return radar(EF_LAND);
|
||||
}
|
||||
|
||||
int
|
||||
rada(void)
|
||||
radar(short type)
|
||||
{
|
||||
char *cp;
|
||||
double tf;
|
||||
|
@ -48,11 +58,8 @@ rada(void)
|
|||
struct nstr_sect ns;
|
||||
union empobj_storage item;
|
||||
char buf[1024];
|
||||
short type;
|
||||
char prompt[80];
|
||||
|
||||
type = player->argp[0][0] == 'l' ? EF_LAND : EF_SHIP;
|
||||
|
||||
sprintf(prompt, "Radar from (%s # or sector(s)) : ", ef_nameof(type));
|
||||
cp = getstarg(player->argp[1], prompt, buf);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue