@@ -2937,25 +2937,25 @@ void Train::MarkDirty()
*/
int Train::UpdateSpeed()
{
uint accel;
switch (_settings_game.vehicle.train_acceleration_model) {
default: NOT_REACHED();
case TAM_ORIGINAL: accel = this->acceleration * (this->GetAccelerationStatus() == AM_BRAKE) ? -4 : 2; break;
case TAM_REALISTIC:
this->max_speed = this->GetCurrentMaxSpeed();
accel = this->GetAcceleration();
break;
}
uint spd = this->subspeed + accel;
this->subspeed = (byte)spd;
int tempmax = this->max_speed;
if (this->cur_speed > this->max_speed)
tempmax = this->cur_speed - (this->cur_speed / 10) - 1;
this->cur_speed = spd = Clamp(this->cur_speed + ((int)spd >> 8), 0, tempmax);
/* Scale speed by 3/4. Previously this was only done when the train was
* facing diagonally and would apply to however many moves the train made