Fix spelling of TRPRF_SPEED_RESTRICTION_SET
This commit is contained in:
@@ -579,7 +579,7 @@ static PBSTileInfo FollowReservation(Owner o, RailTypes rts, TileIndex tile, Tra
|
||||
if (out.flags & TRPRF_REVERSE && au_flags & TRPAUF_REVERSE) {
|
||||
lookahead->AddReverse(z);
|
||||
}
|
||||
if (out.flags & TRPRF_SPEED_RETRICTION_SET) {
|
||||
if (out.flags & TRPRF_SPEED_RESTRICTION_SET) {
|
||||
lookahead->AddSpeedRestriction(out.speed_restriction, z);
|
||||
if (out.speed_restriction != 0 && (speed_restriction == 0 || out.speed_restriction < speed_restriction)) {
|
||||
/* lower of the speed restrictions before or after the signal */
|
||||
|
@@ -700,7 +700,7 @@ void TraceRestrictProgram::Execute(const Train* v, const TraceRestrictProgramInp
|
||||
|
||||
case TRIT_SPEED_RESTRICTION: {
|
||||
out.speed_restriction = GetTraceRestrictValue(item);
|
||||
out.flags |= TRPRF_SPEED_RETRICTION_SET;
|
||||
out.flags |= TRPRF_SPEED_RESTRICTION_SET;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -382,7 +382,7 @@ enum TraceRestrictProgramResultFlags {
|
||||
TRPRF_WAIT_AT_PBS = 1 << 3, ///< Wait at PBS signal is set
|
||||
TRPRF_PBS_RES_END_WAIT = 1 << 4, ///< PBS reservations ending at this signal wait is set
|
||||
TRPRF_REVERSE = 1 << 5, ///< Reverse behind signal
|
||||
TRPRF_SPEED_RETRICTION_SET = 1 << 6, ///< Speed restriction field set
|
||||
TRPRF_SPEED_RESTRICTION_SET = 1 << 6, ///< Speed restriction field set
|
||||
TRPRF_TRAIN_NOT_STUCK = 1 << 7, ///< Train is not stuck
|
||||
TRPRF_NO_PBS_BACK_PENALTY = 1 << 8, ///< Do not apply PBS back penalty
|
||||
};
|
||||
@@ -448,7 +448,7 @@ struct TraceRestrictProgramInput {
|
||||
struct TraceRestrictProgramResult {
|
||||
uint32 penalty; ///< Total additional pathfinder penalty
|
||||
TraceRestrictProgramResultFlags flags; ///< Flags of other actions to take
|
||||
uint16 speed_restriction; ///> Speed restriction to apply (if TRPRF_SPEED_RETRICTION_SET flag present)
|
||||
uint16 speed_restriction; ///> Speed restriction to apply (if TRPRF_SPEED_RESTRICTION_SET flag present)
|
||||
|
||||
TraceRestrictProgramResult()
|
||||
: penalty(0), flags(static_cast<TraceRestrictProgramResultFlags>(0)) { }
|
||||
|
@@ -5349,7 +5349,7 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse)
|
||||
v->reverse_distance = v->gcache.cached_total_length + (IsDiagonalTrack(TrackdirToTrack(dir)) ? 16 : 8);
|
||||
SetWindowDirty(WC_VEHICLE_VIEW, v->index);
|
||||
}
|
||||
if (out.flags & TRPRF_SPEED_RETRICTION_SET) {
|
||||
if (out.flags & TRPRF_SPEED_RESTRICTION_SET) {
|
||||
SetBit(v->flags, VRF_PENDING_SPEED_RESTRICTION);
|
||||
auto range = pending_speed_restriction_change_map.equal_range(v->index);
|
||||
for (auto it = range.first; it != range.second; ++it) {
|
||||
|
Reference in New Issue
Block a user