summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2009-12-31 10:41:03 +0000
committerpeter1138 <peter1138@openttd.org>2009-12-31 10:41:03 +0000
commit739aea3e1afb150100c06362d098b6e19ef2342e (patch)
tree96a085088fe20b79b8cd5267ca3361b68b536835 /src/train_cmd.cpp
parent2d14ced236388a69e80a5031c359d7f1f912a0d1 (diff)
downloadopenttd-739aea3e1afb150100c06362d098b6e19ef2342e.tar.xz
(svn r18674) -Feature (FS#3459): Configurable slope steepness for trains from 0% to 10%, default is 3% as before (mostly by Terkhen)
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index b30547991..a8f4dd2f1 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -523,9 +523,9 @@ static int GetTrainAcceleration(Train *v, bool mode)
if (u->track == TRACK_BIT_DEPOT) max_speed = min(max_speed, 61);
if (HasBit(u->flags, VRF_GOINGUP)) {
- incl += u->tcache.cached_veh_weight * 60; // 3% slope, quite a bit actually
+ incl += u->tcache.cached_veh_weight * 20 * _settings_game.vehicle.train_slope_steepness;
} else if (HasBit(u->flags, VRF_GOINGDOWN)) {
- incl -= u->tcache.cached_veh_weight * 60;
+ incl -= u->tcache.cached_veh_weight * 20 * _settings_game.vehicle.train_slope_steepness;
}
}