@@ -402,13 +402,13 @@ CommandCost CmdBuildAircraft(TileIndex t
}
v->u.air.state = HANGAR;
v->u.air.previous_pos = v->u.air.pos;
v->u.air.targetairport = GetStationIndex(tile);
v->next = u;
v->SetNext(u);
v->service_interval = _patches.servint_aircraft;
v->date_of_last_service = _date;
v->build_year = u->build_year = _cur_year;
@@ -426,14 +426,12 @@ CommandCost CmdBuildAircraft(TileIndex t
VehiclePositionChanged(u);
/* Aircraft with 3 vehicles (chopper)? */
if (v->subtype == AIR_HELICOPTER) {
Vehicle *w = vl[2];
u->next = w;
w = new (w) Aircraft();
w->direction = DIR_N;
w->owner = _current_player;
w->x_pos = v->x_pos;
w->y_pos = v->y_pos;
w->z_pos = v->z_pos + 5;
@@ -442,12 +440,14 @@ CommandCost CmdBuildAircraft(TileIndex t
w->subtype = AIR_ROTOR;
w->cur_image = SPR_ROTOR_STOPPED;
w->random_bits = VehicleRandomBits();
/* Use rotor's air.state to store the rotor animation frame */
w->u.air.state = HRS_ROTOR_STOPPED;
w->UpdateDeltaXY(INVALID_DIR);
u->SetNext(w);
VehiclePositionChanged(w);
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
RebuildVehicleLists();
InvalidateWindow(WC_COMPANY, v->owner);