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 servicing set to none' is disabled, or, if enabled, when 'vehicle breakdowns' is not set to none.
  • Loading branch information
SamuXarick committed Nov 6, 2018
1 parent f878e90 commit 394f8d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/aircraft_cmd.cpp
Expand Up @@ -1542,7 +1542,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 394f8d2

Please sign in to comment.