Allow placing routing restrictions on tunnel/bridge entrance/exit signals

No reserve through support
This commit is contained in:
Jonathan G Rennison
2021-11-13 22:28:14 +00:00
parent 1ee59c8333
commit 74bfe4e6d2
18 changed files with 393 additions and 73 deletions

View File

@@ -114,10 +114,10 @@ struct TrainReservationLookAhead {
this->items.push_back({ end + offset, end + offset + duration, z_pos, speed, TRLIT_TRACK_SPEED });
}
void AddSpeedRestriction(uint16 speed, int16 z_pos)
void AddSpeedRestriction(uint16 speed, int offset, int duration, int16 z_pos)
{
int end = this->RealEndPosition();
this->items.push_back({ end, end, z_pos, speed, TRLIT_SPEED_RESTRICTION });
this->items.push_back({ end + offset, end + offset + duration, z_pos, speed, TRLIT_SPEED_RESTRICTION });
this->speed_restriction = speed;
}