1
0
Fork 0

(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
release/0.4
tron 2006-06-15 14:16:57 +00:00
parent 12a68cc7c3
commit af0354ad24
1 changed files with 2 additions and 2 deletions

View File

@ -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;