(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
|
static int
|
||||||
cmd_sail_ship(struct nstr_item *nstr)
|
cmd_sail_ship(struct nstr_item *nstr)
|
||||||
{
|
{
|
||||||
s_char *cp;
|
char *cp;
|
||||||
struct shpstr ship;
|
struct shpstr ship;
|
||||||
char navpath[MAX_PATH_LEN];
|
char navpath[MAX_PATH_LEN];
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ cmd_sail_ship(struct nstr_item *nstr)
|
||||||
int
|
int
|
||||||
sail(void)
|
sail(void)
|
||||||
{
|
{
|
||||||
s_char *cp;
|
char *cp;
|
||||||
struct nstr_item nstr;
|
struct nstr_item nstr;
|
||||||
|
|
||||||
if (!opt_SAIL) {
|
if (!opt_SAIL) {
|
||||||
|
@ -153,11 +153,9 @@ sail(void)
|
||||||
if (!snxtitem(&nstr, EF_SHIP, player->argp[1]))
|
if (!snxtitem(&nstr, EF_SHIP, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
cp = player->argp[2];
|
cp = player->argp[2];
|
||||||
if ((*player->argp[0] == 'q') /*qsail command */ ||(cp && *cp == 'q')) {
|
if (*player->argp[0] == 'u' || (cp && *cp == '-'))
|
||||||
return show_sail(&nstr);
|
|
||||||
} else if (*player->argp[0] == 'u' /*unsail command */
|
|
||||||
|| (cp && *cp == '-')) {
|
|
||||||
return cmd_unsail_ship(&nstr);
|
return cmd_unsail_ship(&nstr);
|
||||||
} else
|
if (cp && *cp == 'q')
|
||||||
return cmd_sail_ship(&nstr);
|
return show_sail(&nstr);
|
||||||
|
return cmd_sail_ship(&nstr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue