Add support for timetabled wait times at waypoints

This commit is contained in:
Jonathan G Rennison
2018-08-14 12:35:05 +01:00
parent 5732e4f7ff
commit 6578d94e63
10 changed files with 81 additions and 24 deletions

View File

@@ -3007,6 +3007,7 @@ void Vehicle::HandleWaiting(bool stop_waiting)
UpdateVehicleTimetable(this, false);
this->IncrementImplicitOrderIndex();
this->current_order.MakeDummy();
if (this->type == VEH_TRAIN) Train::From(this)->force_proceed = TFP_NONE;
break;
}
@@ -3294,7 +3295,7 @@ void Vehicle::ShowVisualEffect() const
* - is approaching a reversing point and its speed is equal to maximum approach speed
*/
if (HasBit(t->flags, VRF_REVERSING) ||
(IsRailStationTile(t->tile) && t->IsFrontEngine() && t->current_order.ShouldStopAtStation(t, GetStationIndex(t->tile)) &&
(HasStationTileRail(t->tile) && t->IsFrontEngine() && t->current_order.ShouldStopAtStation(t, GetStationIndex(t->tile), IsRailWaypoint(t->tile)) &&
t->cur_speed >= max_speed) ||
(t->reverse_distance >= 1 && t->cur_speed >= ReversingDistanceTargetSpeed(t))) {
return;