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

Method stoppingUpdate

src/OpenLoco/src/Vehicles/VehicleHead.cpp:1461–1489  ·  view source on GitHub ↗

0x004A8CB6

Source from the content-addressed store, hash-verified

1459
1460 // 0x004A8CB6
1461 bool VehicleHead::stoppingUpdate()
1462 {
1463 Vehicle train(head);
1464
1465 if (position != train.veh1->position)
1466 {
1467 sub_4AD93A();
1468 if (status == Status::approaching)
1469 {
1470 stationId = StationId::null;
1471 status = Status::travelling;
1472 }
1473 }
1474
1475 auto* vehType2 = train.veh2;
1476 if (vehType2->routingHandle != routingHandle || vehType2->subPosition != subPosition)
1477 {
1478 return true;
1479 }
1480
1481 status = Status::stopped;
1482
1483 if (vehType2->has73Flags(Flags73::isBrokenDown))
1484 {
1485 stationId = StationId::null;
1486 status = Status::brokenDown;
1487 }
1488 return true;
1489 }
1490
1491 // 0x004A8C81
1492 bool VehicleHead::sub_4A8C81()

Callers

nothing calls this directly

Calls 1

has73FlagsMethod · 0.80

Tested by

no test coverage detected