# HG changeset patch # User peter1138 # Date 2006-12-07 18:58:20 # Node ID 2550172b58b3bcd65f8067fd576277a15aa06365 # Parent 703162bbacf590a7e21f4ec71a425a47d72c22c3 (svn r7425) -Fix (r1681): With realistic acceleration, guarantee a minimum braking force is applied. This ensures trains will stop when going down hill. diff --git a/train_cmd.c b/train_cmd.c --- a/train_cmd.c +++ b/train_cmd.c @@ -428,7 +428,7 @@ static int GetTrainAcceleration(Vehicle if (mode == AM_ACCEL) { return (force - resistance) / (mass * 4); } else { - return min((-force - resistance) / (mass * 4), 10000 / (mass * 4)); + return min((-force - resistance) / (mass * 4), -10000 / (mass * 4)); } }