summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-12-07 18:58:20 +0000
committerpeter1138 <peter1138@openttd.org>2006-12-07 18:58:20 +0000
commit6172cfbeb33acc68c25f15487fc0f4ecd9e9e720 (patch)
tree152412f84ccea4e93aded1eb10a457f44b03503d /train_cmd.c
parente75fabd7f0c5e8b908a9257ce8aad820386f2bfd (diff)
downloadopenttd-6172cfbeb33acc68c25f15487fc0f4ecd9e9e720.tar.xz
(svn r7425) -Fix (r1681): With realistic acceleration, guarantee a minimum braking
force is applied. This ensures trains will stop when going down hill.
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 6f719a2a1..9cc1ec111 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -428,7 +428,7 @@ static int GetTrainAcceleration(Vehicle *v, bool mode)
if (mode == AM_ACCEL) {
return (force - resistance) / (mass * 4);
} else {
- return min((-force - resistance) / (mass * 4), 10000 / (mass * 4));
+ return min((-force - resistance) / (mass * 4), -10000 / (mass * 4));
}
}