From af0354ad2430a7faff0c70a23de134c1037bfd6b Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 15 Jun 2006 14:16:57 +0000 Subject: [PATCH] (svn r5279) -Backport: r4116 -Fix: The AI should send a plane into a hangar if it's not in a hangar _or_ not stopped, not when it's not in a hangar _and_ not stopped --- ai/default/default.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ai/default/default.c b/ai/default/default.c index 66dacd0143..ee2b9ea972 100644 --- a/ai/default/default.c +++ b/ai/default/default.c @@ -351,7 +351,7 @@ static void AiHandleReplaceAircraft(Player *p) BackuppedOrders orderbak[1]; EngineID veh; - if (!IsAircraftHangarTile(v->tile) && !(v->vehstatus&VS_STOPPED)) { + if (!IsAircraftHangarTile(v->tile) || !(v->vehstatus&VS_STOPPED)) { AiHandleGotoDepot(p, CMD_SEND_AIRCRAFT_TO_HANGAR); return; } @@ -3575,7 +3575,7 @@ static void AiStateSellVeh(Player *p) DoCommandByTile(0, v->index, 0, DC_EXEC, CMD_SELL_ROAD_VEH); } else if (v->type == VEH_Aircraft) { - if (!IsAircraftHangarTile(v->tile) && !(v->vehstatus&VS_STOPPED)) { + if (!IsAircraftHangarTile(v->tile) || !(v->vehstatus & VS_STOPPED)) { if (v->current_order.type != OT_GOTO_DEPOT) DoCommandByTile(0, v->index, 0, DC_EXEC, CMD_SEND_AIRCRAFT_TO_HANGAR); goto going_to_depot;