# HG changeset patch # User tron # Date 1150381017 0 # Node ID cce7f27e214d858b9f0c1a25d7fb5359daa2ecdd # Parent fcf09abbde969e7a6a82f449f3bb3d3e6606214b (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 diff -r fcf09abbde96 -r cce7f27e214d ai/default/default.c --- a/ai/default/default.c Mon Jun 05 08:30:58 2006 +0000 +++ b/ai/default/default.c Thu Jun 15 14:16:57 2006 +0000 @@ -351,7 +351,7 @@ 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 @@ 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;