Mercurial > hg > openttd
changeset 17110:2bf4a68e98fd draft
(svn r21847) -Fix [FS#4423]: slowing down of trains was done by reducing the speed by 10%, but also when you're just 1% too fast, so limit the slowdown till the new maximum speed
author | rubidium <rubidium@openttd.org> |
---|---|
date | Wed, 19 Jan 2011 08:24:38 +0000 |
parents | 69b5b1b3eddd |
children | 96fa4c5dcacf |
files | src/train_cmd.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2635,7 +2635,7 @@ { 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;