summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/train_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 93d91f4c3..fe8f28b5d 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -2635,7 +2635,7 @@ int Train::UpdateSpeed()
{
int tempmax = max_speed;
if (this->cur_speed > max_speed) {
- tempmax = this->cur_speed - (this->cur_speed / 10) - 1;
+ tempmax = max(this->cur_speed - (this->cur_speed / 10) - 1, tempmax);
}
/* Force a minimum speed of 1 km/h when realistic acceleration is on and the train is not braking. */
int min_speed = (_settings_game.vehicle.train_acceleration_model == AM_ORIGINAL || this->GetAccelerationStatus() == AS_BRAKE) ? 0 : 2;