MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / UpdateWaypointOrder

Function UpdateWaypointOrder

src/saveload/station_sl.cpp:31–39  ·  view source on GitHub ↗

* Update the buoy orders to be waypoint orders. * @param o the order 'list' to check. */

Source from the content-addressed store, hash-verified

29 * @param o the order 'list' to check.
30 */
31static void UpdateWaypointOrder(Order &o)
32{
33 if (!o.IsType(OT_GOTO_STATION)) return;
34
35 const Station *st = Station::Get(o.GetDestination().ToStationID());
36 if ((st->had_vehicle_of_type & HVOT_WAYPOINT) == 0) return;
37
38 o.MakeGoToWaypoint(o.GetDestination().ToStationID());
39}
40
41/**
42 * Perform all steps to upgrade from the old station buoys to the new version

Callers 1

MoveBuoysToWaypointsFunction · 0.70

Calls 4

IsTypeMethod · 0.80
GetDestinationMethod · 0.80
MakeGoToWaypointMethod · 0.80
ToStationIDMethod · 0.45

Tested by

no test coverage detected