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
|
@ -128,9 +128,11 @@ landmine(void)
|
|||
sect.sct_mines, xyas(sect.sct_x, sect.sct_y, player->cnum));
|
||||
sprintf(prompt, "Drop how many mines from %s? ", prland(&land));
|
||||
mines_wanted = onearg(player->argp[2], prompt);
|
||||
if (!check_land_ok(&land))
|
||||
if (mines_wanted < 0)
|
||||
return RET_SYN;
|
||||
if (mines_wanted == 0)
|
||||
continue;
|
||||
if (mines_wanted <= 0)
|
||||
if (!check_land_ok(&land))
|
||||
continue;
|
||||
land.lnd_mission = 0;
|
||||
total_mines_laid = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue