From b46191aebbaff681833837d8b448966a72679120 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 23 Nov 2007 18:23:06 +0000 Subject: [PATCH] (getilist): Remove bogus fuel check. It was inconsistent with the one in mission_pln_equip(), which is called from ac_intercept(). The inconsistency appeared in Empire3, and had no ill effect then. But rev. 1.42 screwed up the fuel test here: it made interceptors that don't use fuel (SAMs) require petrol to be present to fly. --- src/lib/subs/aircombat.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/lib/subs/aircombat.c b/src/lib/subs/aircombat.c index 55bab3ed..de30b7fc 100644 --- a/src/lib/subs/aircombat.c +++ b/src/lib/subs/aircombat.c @@ -1032,11 +1032,8 @@ getilist(struct emp_qelem *list, natid own, struct emp_qelem *a, { struct plchrstr *pcp; struct plnstr plane; - struct shpstr ship; - struct lndstr land; struct sctstr sect; struct nstr_item ni; - int petrol; struct plist *ip; emp_initque(list); @@ -1053,25 +1050,15 @@ getilist(struct emp_qelem *list, natid own, struct emp_qelem *a, continue; if (plane.pln_effic < 40) continue; - if (plane.pln_ship >= 0) { + if (plane.pln_ship >= 0 || plane.pln_land >= 0) { if (!can_fly(plane.pln_uid)) continue; - getship(plane.pln_ship, &ship); - petrol = ship.shp_item[I_PETROL]; - } else if (plane.pln_land >= 0) { - if (!can_fly(plane.pln_uid)) - continue; - getland(plane.pln_land, &land); - petrol = land.lnd_item[I_PETROL]; } else { getsect(plane.pln_x, plane.pln_y, §); - petrol = sect.sct_item[I_PETROL]; if ((sect.sct_effic < 60 || sect.sct_type != SCT_AIRPT) && (pcp->pl_flags & P_V) == 0) continue; } - if (petrol <= pcp->pl_fuel / 2) - continue; /* Finally, is it in the list of planes already in flight? */ if (ac_isflying(&plane, a))