Skip to content

Commit

Permalink
Change OpenTTD#6493: Only serviceathelipad when breakdowns are enable…
Browse files Browse the repository at this point in the history
…d or when no_servicing_if_no_breakdowns is disabled

Helicopters with 'service at helipads' enabled, will only do so when 'disable servicing when breakdowns set to none' is disabled, or, if enabled, when 'vehicle breakdowns' is not set to none.
  • Loading branch information
SamuXarick committed Jan 26, 2019
1 parent b6de8c0 commit c51e3a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/aircraft_cmd.cpp
Expand Up @@ -1509,7 +1509,8 @@ static void AircraftEventHandler_AtTerminal(Aircraft *v, const AirportFTAClass *
AircraftEventHandler_EnterTerminal(v, apc);
/* on an airport with helipads, a helicopter will always land there
* and get serviced at the same time - setting */
if (_settings_game.order.serviceathelipad) {
if ((!_settings_game.order.no_servicing_if_no_breakdowns || _settings_game.difficulty.vehicle_breakdowns != 0) &&
_settings_game.order.serviceathelipad) {
if (v->subtype == AIR_HELICOPTER && apc->num_helipads > 0) {
/* an excerpt of ServiceAircraft, without the invisibility stuff */
v->date_of_last_service = _date;
Expand Down

0 comments on commit c51e3a0

Please sign in to comment.