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

Method landCrashedUpdate

src/OpenLoco/src/Vehicles/VehicleHead.cpp:4026–4045  ·  view source on GitHub ↗

0x004AA625

Source from the content-addressed store, hash-verified

4024
4025 // 0x004AA625
4026 void VehicleHead::landCrashedUpdate()
4027 {
4028 Vehicle train(*this);
4029 for (auto& car : train.cars)
4030 {
4031 for (auto& carComponent : car)
4032 {
4033 CarUpdateState carUpdateState{ carComponent.front, carComponent.back, false };
4034 const auto initialFrontPos = carComponent.front->position;
4035 carComponent.front->updateSegmentCrashed();
4036 carUpdateState.hasBogieMoved |= carComponent.front->position != initialFrontPos;
4037
4038 const auto initialBackPos = carComponent.front->position;
4039 carComponent.back->updateSegmentCrashed();
4040 carUpdateState.hasBogieMoved |= carComponent.back->position != initialBackPos;
4041
4042 carComponent.body->updateSegmentCrashed(carUpdateState);
4043 }
4044 }
4045 }
4046
4047 // 0x004A3EF6
4048 // pos.x : ax

Callers

nothing calls this directly

Calls 1

updateSegmentCrashedMethod · 0.45

Tested by

no test coverage detected