Fix advisory max speed being higher than strict max for reservation end

In GetCurrentMaxSpeedInfoInternal
This commit is contained in:
Jonathan G Rennison
2024-05-18 09:24:57 +01:00
parent 242e87652b
commit 89902c8ab1

View File

@@ -1119,6 +1119,7 @@ Train::MaxSpeedInfo Train::GetCurrentMaxSpeedInfoInternal(bool update_state) con
LimitSpeedFromLookAhead(max_speed, stats, this->lookahead->current_position, this->lookahead->reservation_end_position,
0, this->lookahead->reservation_end_z - stats.z_pos);
}
advisory_max_speed = std::min(advisory_max_speed, max_speed);
VehicleOrderID current_order_index = this->cur_real_order_index;
const Order *order = &(this->current_order);
StationID last_station_visited = this->last_station_visited;