From 8d62bdb360b33fc08b43faf23b72a13634ea9377 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 24 Mar 2008 16:24:42 +0100 Subject: [PATCH] Fix launch_as() to use up supplies only when actually launching --- src/lib/commands/laun.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/commands/laun.c b/src/lib/commands/laun.c index 7e3198f7..852b9a61 100644 --- a/src/lib/commands/laun.c +++ b/src/lib/commands/laun.c @@ -171,10 +171,6 @@ launch_as(struct plnstr *pp) int dam, nukedam; 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); if (!check_plane_ok(pp)) return RET_FAIL; @@ -202,6 +198,10 @@ launch_as(struct plnstr *pp) pr("No satellites there!\n"); 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, prplane(&plane), sx, sy, plane.pln_own)) { dam = pln_damage(pp, sx, sy, 'p', &nukedam, 1);