(svn r18674) -Feature (FS#3459): Configurable slope steepness for trains from 0% to 10%, default is 3% as before (mostly by Terkhen)

This commit is contained in:
peter1138
2009-12-31 10:41:03 +00:00
parent 2d14ced236
commit 739aea3e1a
6 changed files with 7 additions and 3 deletions

View File

@@ -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;
}
}