Changeset - r16483:49069459064a
[Not reviewed]
master
0 1 0
yexo - 14 years ago 2010-11-16 23:38:05
yexo@openttd.org
(svn r21218) -Fix (r21189)[FS#4236]: don't force a minimum speed when braking
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/train_cmd.cpp
Show inline comments
 
@@ -2806,8 +2806,8 @@ int Train::UpdateSpeed()
 
		if (this->cur_speed > max_speed) {
 
			tempmax = this->cur_speed - (this->cur_speed / 10) - 1;
 
		}
 
		/* Force a minimum speed of 1 km/h when realistic acceleration is on. */
 
		int min_speed = (_settings_game.vehicle.train_acceleration_model == AM_ORIGINAL) ? 0 : 2;
 
		/* 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;
 
		this->cur_speed = spd = Clamp(this->cur_speed + ((int)spd >> 8), min_speed, tempmax);
 
	}
 

	
0 comments (0 inline, 0 general)