Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix #6574 #6636 #5405 #6493: Aircraft hangar issues #6925
Code-wise this looks fine, but I don't know enough about the code to know whether these are the correct solutions or if it's what's desired. A couple of things:
Can you elaborate on why the fix for #5405 is necessary, when it was supposedly fixed already?
Also, it would be really nice if you could merge the compiler warnings commit into which ever commit caused the warning - the changes are small enough that this is probably easiest to achieve with some manual commit editing - interactive rebase, "pick" the necessary commits & amend them
Sends the aircraft to takeoff if the airport it's currently at, got no hangar even if the order is to go to hangar.
When replacing an airport with another, cancel current orders of type 'go to depot' from aircraft still heading to it if the rebuilt airport doesn't have a hangar (helicopter vs heliport), or if the airplane can't land on the rebuilt airport (airplane vs helistation). Removes 'go to hangar' orders from all aircraft when replacing an airport with hangar with another without hangar (heliport).
…kipping to a go to hangar order When manually skipping to a 'go to hangar' order in the order list, while the aircraft is flying, direct the aircraft to the correct location of the hangar.
…stinations and then ensure these are within range of each other This fix is to avoid out of range when using service at nearest hangar orders
… hangar outside the order list If a helicopter needs to be sent to a hangar during automatic service, and there are no airports with hangars in the orders (travelling between heliports), a nearby hangar outside the orders will be searched. If the distance to a found hangar is shorter than the distance to the helistation/airport the helicopter is headed to, the helicopter is sent to that hangar.
…en 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.
…dingReplace In order to verify if a helicopter with service at helipad has a pending replace, it's needed to call HasPendingReplace directly, as a seperate function that can be used by some aircraft_cmd.cpp functions
… replace Check if an airplane needs automatic servicing or if a helicopter has a pending replace and send it to hangar before sending to takeoff This replaces the old method which was attempting to do the same, but was ultimately canceling automatic servicing orders upon landing.