Fix parameter shadowing in ApplyLookAheadItem

This commit is contained in:
Jonathan G Rennison
2023-03-09 17:33:19 +00:00
parent 277985ad9d
commit 3017cb63a9

View File

@@ -944,8 +944,8 @@ static void ApplyLookAheadItem(const Train *v, const TrainReservationLookAheadIt
current_order_index++;
AdvanceOrderIndex(v, current_order_index);
order = v->GetOrder(current_order_index);
uint16 max_speed = order->GetMaxSpeed();
if (max_speed < UINT16_MAX) limit_advisory_speed(item.start, max_speed, item.z_pos);
uint16 order_max_speed = order->GetMaxSpeed();
if (order_max_speed < UINT16_MAX) limit_advisory_speed(item.start, order_max_speed, item.z_pos);
}
break;
}