Fix launch_as() to use up supplies only when actually launching
This commit is contained in:
parent
15fab1c9a5
commit
8d62bdb360
1 changed files with 4 additions and 4 deletions
|
@ -171,10 +171,6 @@ launch_as(struct plnstr *pp)
|
||||||
int dam, nukedam;
|
int dam, nukedam;
|
||||||
natid oldown;
|
natid oldown;
|
||||||
|
|
||||||
if (msl_equip(pp, 'p') < 0) {
|
|
||||||
pr("%s not enough petrol or shells!\n", prplane(pp));
|
|
||||||
return RET_FAIL;
|
|
||||||
}
|
|
||||||
cp = getstarg(player->argp[2], "Target sector? ", buf);
|
cp = getstarg(player->argp[2], "Target sector? ", buf);
|
||||||
if (!check_plane_ok(pp))
|
if (!check_plane_ok(pp))
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
|
@ -202,6 +198,10 @@ launch_as(struct plnstr *pp)
|
||||||
pr("No satellites there!\n");
|
pr("No satellites there!\n");
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
|
if (msl_equip(pp, 'p') < 0) {
|
||||||
|
pr("%s not enough petrol or shells!\n", prplane(pp));
|
||||||
|
return RET_FAIL;
|
||||||
|
}
|
||||||
if (msl_hit(pp, pln_def(&plane), EF_PLANE, N_SAT_KILL, N_SAT_KILL,
|
if (msl_hit(pp, pln_def(&plane), EF_PLANE, N_SAT_KILL, N_SAT_KILL,
|
||||||
prplane(&plane), sx, sy, plane.pln_own)) {
|
prplane(&plane), sx, sy, plane.pln_own)) {
|
||||||
dam = pln_damage(pp, sx, sy, 'p', &nukedam, 1);
|
dam = pln_damage(pp, sx, sy, 'p', &nukedam, 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue