]> git.pond.sub.org Git - empserver/commitdiff
(sail): There is no qsail command, remove test for it. Test the
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 15 Apr 2006 10:55:19 +0000 (10:55 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 15 Apr 2006 10:55:19 +0000 (10:55 +0000)
second argument only when the command is sail.  Before, `unsail 42 q'
showed the sailing path instead of clearing it.

src/lib/commands/sail.c

index c1836028dbf1dbe4c21e1b5d528c9681982bd69f..dcfcda97ce4ee371469b3ed7f0830ec364f50ccd 100644 (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);
 }