Road vehicles may no longer be stopped on level crossings.
This commit is contained in:
@@ -643,7 +643,11 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
if (HasBit(v->vehicle_flags, VF_TIMETABLE_SEPARATION)) ClrBit(v->vehicle_flags, VF_TIMETABLE_STARTED);
|
||||
|
||||
v->vehstatus ^= VS_STOPPED;
|
||||
if (v->type != VEH_TRAIN) v->cur_speed = 0; // trains can stop 'slowly'
|
||||
if (v->type == VEH_ROAD) {
|
||||
if (!RoadVehicle::From(v)->IsRoadVehicleOnLevelCrossing()) v->cur_speed = 0;
|
||||
} else if (v->type != VEH_TRAIN) {
|
||||
v->cur_speed = 0; // trains can stop 'slowly'
|
||||
}
|
||||
v->MarkDirty();
|
||||
SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
|
||||
SetWindowDirty(WC_VEHICLE_DEPOT, v->tile);
|
||||
|
Reference in New Issue
Block a user