(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:
peter1138 2006-12-07 18:58:20 +00:00
parent 23d3d9b497
commit a90642f135

View File

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