(sail): There is no qsail command, remove test for it. Test the
second argument only when the command is sail. Before, `unsail 42 q' showed the sailing path instead of clearing it.
This commit is contained in:
parent
b23f9ce5db
commit
328c9af40a
1 changed files with 6 additions and 8 deletions
|
@ -112,7 +112,7 @@ cmd_unsail_ship(struct nstr_item *nstr)
|
|||
static int
|
||||
cmd_sail_ship(struct nstr_item *nstr)
|
||||
{
|
||||
s_char *cp;
|
||||
char *cp;
|
||||
struct shpstr ship;
|
||||
char navpath[MAX_PATH_LEN];
|
||||
|
||||
|
@ -143,7 +143,7 @@ cmd_sail_ship(struct nstr_item *nstr)
|
|||
int
|
||||
sail(void)
|
||||
{
|
||||
s_char *cp;
|
||||
char *cp;
|
||||
struct nstr_item nstr;
|
||||
|
||||
if (!opt_SAIL) {
|
||||
|
@ -153,11 +153,9 @@ sail(void)
|
|||
if (!snxtitem(&nstr, EF_SHIP, player->argp[1]))
|
||||
return RET_SYN;
|
||||
cp = player->argp[2];
|
||||
if ((*player->argp[0] == 'q') /*qsail command */ ||(cp && *cp == 'q')) {
|
||||
return show_sail(&nstr);
|
||||
} else if (*player->argp[0] == 'u' /*unsail command */
|
||||
|| (cp && *cp == '-')) {
|
||||
if (*player->argp[0] == 'u' || (cp && *cp == '-'))
|
||||
return cmd_unsail_ship(&nstr);
|
||||
} else
|
||||
return cmd_sail_ship(&nstr);
|
||||
if (cp && *cp == 'q')
|
||||
return show_sail(&nstr);
|
||||
return cmd_sail_ship(&nstr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue