0x004A8C11
| 1293 | |
| 1294 | // 0x004A8C11 |
| 1295 | bool VehicleHead::updateLand() |
| 1296 | { |
| 1297 | Vehicle train(head); |
| 1298 | Vehicle2* vehType2 = train.veh2; |
| 1299 | |
| 1300 | // If don't have any running issue and is approaching |
| 1301 | if ((!vehType2->has73Flags(Flags73::isBrokenDown) || vehType2->has73Flags(Flags73::isStillPowered)) && status == Status::approaching) |
| 1302 | { |
| 1303 | if (mode == TransportMode::road) |
| 1304 | { |
| 1305 | auto timeoutStatus = categoriseTimeElapsed(); // bl |
| 1306 | if (timeoutStatus == SignalTimeoutStatus::firstTimeout) |
| 1307 | { |
| 1308 | return sub_4A8DB7(); |
| 1309 | } |
| 1310 | else if (timeoutStatus == SignalTimeoutStatus::turnaroundAtSignalTimeout) |
| 1311 | { |
| 1312 | return tryReverse(); |
| 1313 | } |
| 1314 | } |
| 1315 | |
| 1316 | if (hasVehicleFlags(VehicleFlags::commandStop)) |
| 1317 | { |
| 1318 | return stoppingUpdate(); |
| 1319 | } |
| 1320 | else if (hasVehicleFlags(VehicleFlags::manualControl)) |
| 1321 | { |
| 1322 | if (manualPower <= -20) |
| 1323 | { |
| 1324 | return sub_4A8C81(); |
| 1325 | } |
| 1326 | } |
| 1327 | |
| 1328 | return landTryBeginUnloading(); |
| 1329 | } |
| 1330 | |
| 1331 | if (status == Status::unloading) |
| 1332 | { |
| 1333 | updateUnloadCargo(); |
| 1334 | |
| 1335 | return true; |
| 1336 | } |
| 1337 | else if (status == Status::loading) |
| 1338 | { |
| 1339 | return landLoadingUpdate(); |
| 1340 | } |
| 1341 | else if (status == Status::crashed) |
| 1342 | { |
| 1343 | landCrashedUpdate(); |
| 1344 | |
| 1345 | return false; |
| 1346 | } |
| 1347 | else if (status == Status::stuck) |
| 1348 | { |
| 1349 | return false; |
| 1350 | } |
| 1351 | else |
| 1352 | { |
nothing calls this directly
no test coverage detected