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

Method checkIfAtOrderStation

src/OpenLoco/src/Vehicles/VehicleHead.cpp:2689–2707  ·  view source on GitHub ↗

0x004B9987

Source from the content-addressed store, hash-verified

2687
2688 // 0x004B9987
2689 void VehicleHead::checkIfAtOrderStation()
2690 {
2691 OrderRingView orders(orderTableOffset, currentOrder);
2692 auto curOrder = orders.begin();
2693 auto* orderStation = curOrder->as<OrderStation>();
2694 if (orderStation == nullptr)
2695 {
2696 return;
2697 }
2698
2699 if (orderStation->getStation() != stationId)
2700 {
2701 return;
2702 }
2703
2704 curOrder++;
2705 currentOrder = curOrder->getOffset() - orderTableOffset;
2706 Ui::WindowManager::invalidateOrderPageByVehicleNumber(enumValue(id));
2707 }
2708
2709 // 0x004BACAF
2710 void VehicleHead::updateLastJourneyAverageSpeed()

Callers

nothing calls this directly

Calls 5

enumValueFunction · 0.85
getStationMethod · 0.80
getOffsetMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected