Add: Setting to uniformly slow the acceleration and braking of realistic trains
This does not affect the maximum speed.
This commit is contained in:

committed by
Jonathan G Rennison

parent
0351734729
commit
7ef8706ed2
@@ -309,7 +309,13 @@ GroundVehicleAcceleration GroundVehicle<T, Type>::GetAcceleration()
|
||||
ShowTrainTooHeavyAdviceMessage(this);
|
||||
}
|
||||
|
||||
if (Train::From(this)->UsingRealisticBraking() && _settings_game.vehicle.limit_train_acceleration) {
|
||||
bool using_realistic_braking = Train::From(this)->UsingRealisticBraking();
|
||||
|
||||
if (using_realistic_braking) {
|
||||
accel = DivTowardsPositiveInf(accel * _settings_game.vehicle.train_acc_braking_percent, 100);
|
||||
}
|
||||
|
||||
if (using_realistic_braking && _settings_game.vehicle.limit_train_acceleration) {
|
||||
accel = std::min(accel, 250);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user