(svn r2185) -Fix: Made sure that the realistic acceleration does not freeze trains anymore

This commit is contained in:
celestar 2005-04-11 21:10:47 +00:00
parent 4719c452e8
commit cc53b11637

View File

@ -231,7 +231,7 @@ static int GetTrainAcceleration(Vehicle *v, bool mode)
if (v->u.rail.railtype != 2) force = min(force, mass * 10 * 200);
if (mode == AM_ACCEL) {
return (force - resistance) / (mass * 4);
return max((force - resistance) / (mass * 4), 2);
} else {
return min((-force - resistance) / (mass * 4), 10000 / (mass * 4));
}