diff options
author | yexo <yexo@openttd.org> | 2010-11-16 23:38:05 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-11-16 23:38:05 +0000 |
commit | 8578ec749677f8ec4020a105fce4b843432d67d3 (patch) | |
tree | 861def550ad26ed35a93092eefbc09529f1e35d3 | |
parent | 33281491b16c566e26b05bb0a0d24f9cb7e2da77 (diff) | |
download | openttd-8578ec749677f8ec4020a105fce4b843432d67d3.tar.xz |
(svn r21218) -Fix (r21189)[FS#4236]: don't force a minimum speed when braking
-rw-r--r-- | src/train_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index bb3e1d797..df787ed09 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2806,8 +2806,8 @@ int Train::UpdateSpeed() if (this->cur_speed > max_speed) { tempmax = this->cur_speed - (this->cur_speed / 10) - 1; } - /* Force a minimum speed of 1 km/h when realistic acceleration is on. */ - int min_speed = (_settings_game.vehicle.train_acceleration_model == AM_ORIGINAL) ? 0 : 2; + /* 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; this->cur_speed = spd = Clamp(this->cur_speed + ((int)spd >> 8), min_speed, tempmax); } |