Add train cache flag for whether train using realistic braking physics

This commit is contained in:
Jonathan G Rennison
2021-04-15 19:39:36 +01:00
parent b514d29db1
commit ba2e6087b2
8 changed files with 30 additions and 20 deletions

View File

@@ -795,13 +795,13 @@ int RoadVehicle::UpdateSpeed()
default: NOT_REACHED();
case AM_ORIGINAL: {
int acceleration = this->overtaking != 0 ? 512 : 256;
return this->DoUpdateSpeed({ acceleration, acceleration }, 0, max_speed, max_speed);
return this->DoUpdateSpeed({ acceleration, acceleration }, 0, max_speed, max_speed, false);
}
case AM_REALISTIC: {
GroundVehicleAcceleration acceleration = this->GetAcceleration();
if (this->overtaking != 0) acceleration.acceleration += 256;
return this->DoUpdateSpeed(acceleration, this->GetAccelerationStatus() == AS_BRAKE ? 0 : 4, max_speed, max_speed);
return this->DoUpdateSpeed(acceleration, this->GetAccelerationStatus() == AS_BRAKE ? 0 : 4, max_speed, max_speed, false);
}
}
}