mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r21847) -Fix [FS#4423]: slowing down of trains was done by reducing the speed by 10%, but also when you're just 1% too fast, so limit the slowdown till the new maximum speed
This commit is contained in:
parent
9ca4b629cd
commit
922d60f516
@ -2635,7 +2635,7 @@ int Train::UpdateSpeed()
|
||||
{
|
||||
int tempmax = max_speed;
|
||||
if (this->cur_speed > max_speed) {
|
||||
tempmax = this->cur_speed - (this->cur_speed / 10) - 1;
|
||||
tempmax = max(this->cur_speed - (this->cur_speed / 10) - 1, tempmax);
|
||||
}
|
||||
/* Force a minimum speed of 1 km/h when realistic acceleration is on and the train is not braking. */
|
||||
int min_speed = (_settings_game.vehicle.train_acceleration_model == AM_ORIGINAL || this->GetAccelerationStatus() == AS_BRAKE) ? 0 : 2;
|
||||
|
Loading…
Reference in New Issue
Block a user