]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/mfir.c
Fix command abortion after getting player input
[empserver] / src / lib / commands / mfir.c
index 787aee04b04ff3323d970e1f7e165e125b759477..398b3b7f19b4f6e8fd5a90ee98cb9c4a387b977a 100644 (file)
@@ -118,10 +118,6 @@ multifire(void)
     if (!snxtitem(&nbst, type, ptr))
        return RET_SYN;
 
-    if (player->aborted) {
-       pr("Fire aborted.\n");
-       return RET_OK;
-    }
     while (nxtitem(&nbst, &item)) {
        if (type == EF_LAND) {
            if (!getland(item.land.lnd_uid, &fland))
@@ -220,13 +216,11 @@ multifire(void)
            fy = fsect.sct_y;
        }
 
-       if ((ptr = getstarg(player->argp[3], "Firing at? ", buf)) == 0
-           || *ptr == '\0')
-           continue;
-       if (player->aborted) {
-           pr("Fire aborted.\n");
+       ptr = getstarg(player->argp[3], "Firing at? ", buf);
+       if (!ptr)
+           return RET_SYN;
+       if (!*ptr)
            continue;
-       }
        if (!issector(ptr)) {
            vshipno = atoi(ptr);
            if (vshipno < 0 || !getship(vshipno, &vship) ||