* Clear platform reservation during station building/removing. * @param v vehicle which holds reservation */
| 1327 | * @param v vehicle which holds reservation |
| 1328 | */ |
| 1329 | static void FreeTrainReservation(Train *v) |
| 1330 | { |
| 1331 | FreeTrainTrackReservation(v); |
| 1332 | if (IsRailStationTile(v->tile)) SetRailStationPlatformReservation(v->tile, TrackdirToExitdir(v->GetVehicleTrackdir()), false); |
| 1333 | v = v->Last(); |
| 1334 | if (IsRailStationTile(v->tile)) SetRailStationPlatformReservation(v->tile, TrackdirToExitdir(ReverseTrackdir(v->GetVehicleTrackdir())), false); |
| 1335 | } |
| 1336 | |
| 1337 | /** |
| 1338 | * Restore platform reservation during station building/removing. |
no test coverage detected