From 369cba323061ca4c9703b950f9420717f5cc638f Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 26 Mar 2006 18:48:23 +0000 Subject: (svn 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(-) (limited to 'ai') diff --git a/ai/default/default.c b/ai/default/default.c index e87079dc5..847ef12e9 100644 --- a/ai/default/default.c +++ b/ai/default/default.c @@ -359,7 +359,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; } @@ -3504,7 +3504,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; -- cgit v1.2.3-54-g00ecf