mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r7425) -Fix (r1681): With realistic acceleration, guarantee a minimum braking
force is applied. This ensures trains will stop when going down hill.
This commit is contained in:
parent
23d3d9b497
commit
a90642f135
@ -428,7 +428,7 @@ static int GetTrainAcceleration(Vehicle *v, bool mode)
|
|||||||
if (mode == AM_ACCEL) {
|
if (mode == AM_ACCEL) {
|
||||||
return (force - resistance) / (mass * 4);
|
return (force - resistance) / (mass * 4);
|
||||||
} else {
|
} else {
|
||||||
return min((-force - resistance) / (mass * 4), 10000 / (mass * 4));
|
return min((-force - resistance) / (mass * 4), -10000 / (mass * 4));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user