MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / refreshCars

Method refreshCars

src/OpenLoco/src/Vehicles/Vehicle.cpp:722–737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

720 }
721
722 void Vehicle::refreshCars()
723 {
724 auto component = veh2->nextVehicleComponent();
725 if (component == nullptr)
726 {
727 throw Exception::RuntimeError("Bad vehicle structure");
728 }
729 if (component->getSubType() != VehicleEntityType::tail)
730 {
731 cars = Cars{ Car{ component } };
732 }
733 else
734 {
735 cars = Cars{};
736 }
737 }
738
739 // 0x00426790
740 AirportObjectFlags VehicleBogie::getCompatibleAirportType()

Callers 1

updateVehicleMethod · 0.80

Calls 2

nextVehicleComponentMethod · 0.80
getSubTypeMethod · 0.45

Tested by

no test coverage detected