(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:
Markus Armbruster 2006-04-15 10:55:19 +00:00
parent b23f9ce5db
commit 328c9af40a

View file

@ -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);
}