Add setting to also limit acceleration when using realistic braking

This commit is contained in:
Jonathan G Rennison
2023-08-09 00:16:28 +01:00
parent 3840a37999
commit 8a14d8c246
5 changed files with 17 additions and 0 deletions

View File

@@ -307,6 +307,10 @@ GroundVehicleAcceleration GroundVehicle<T, Type>::GetAcceleration()
extern std::vector<Train *> _tick_train_too_heavy_cache;
_tick_train_too_heavy_cache.push_back(Train::From(this));
}
if (Train::From(this)->UsingRealisticBraking() && _settings_game.vehicle.limit_train_acceleration) {
accel = std::min(accel, 250);
}
}
return { accel, braking_accel };