Fix command abortion after getting player input
The old code didn't honor command abortion at the following prompts:
* arm third argument
* deliver fourth argument (also simplify)
* fire third argument
* fly and recon prompt for carrier to land on: pln_onewaymission()
treated abort like empty input, which made planes attempt landing in
the sector.
* lmine second argument
* order d fourth argument
* power c nat(s) argument
* range second argument
* sail second argument
* shutdown both arguments (first one was broken in commit 84cfd670
,
v4.3.10, second one never worked).
* tend third argument
This commit is contained in:
parent
b3a7a8ee11
commit
9eda5f87b8
11 changed files with 51 additions and 32 deletions
|
@ -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')
|
||||
ptr = getstarg(player->argp[3], "Firing at? ", buf);
|
||||
if (!ptr)
|
||||
return RET_SYN;
|
||||
if (!*ptr)
|
||||
continue;
|
||||
if (player->aborted) {
|
||||
pr("Fire aborted.\n");
|
||||
continue;
|
||||
}
|
||||
if (!issector(ptr)) {
|
||||
vshipno = atoi(ptr);
|
||||
if (vshipno < 0 || !getship(vshipno, &vship) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue