mirror of https://github.com/OpenTTD/OpenTTD
(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 stoppedrelease/0.4
parent
12a68cc7c3
commit
af0354ad24
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue