Add a setting to turn off road vehicle slowdown in curves

Prior to this change, road vehicles would always slowdown in curves. This forces the player to build grid like roads. With new height levels and more mountainous maps and in the absense of diagonal roads this causes unnecessary pain. It should be an option to turn this off, so mountainous maps and curvy roads are not punishing the player unnecessarily. Nobody wants to build grid like roads outside of towns.
This commit is contained in:
Andreas Schmitt
2021-06-17 15:30:06 +02:00
committed by Jonathan G Rennison
parent 7555da1642
commit ec40677fdc
5 changed files with 19 additions and 3 deletions

View File

@@ -496,7 +496,10 @@ inline int RoadVehicle::GetCurrentMaxSpeed() const
if (this->state <= RVSB_TRACKDIR_MASK && IsReversingRoadTrackdir((Trackdir)this->state)) {
max_speed = this->gcache.cached_max_track_speed / 2;
break;
} else if ((u->direction & 1) == 0) {
}
// Are we in a curve and should slow down?
if (((u->direction & 1) == 0) && _settings_game.vehicle.slow_road_vehicles_in_curves) {
max_speed = this->gcache.cached_max_track_speed * 3 / 4;
}
}