mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
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:
parent
7555da1642
commit
ec40677fdc
@ -1807,6 +1807,8 @@ STR_CONFIG_SETTING_NOSERVICE :Disable servici
|
||||
STR_CONFIG_SETTING_NOSERVICE_HELPTEXT :When enabled, vehicles do not get serviced if they cannot break down
|
||||
STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Enable wagon speed limits: {STRING2}
|
||||
STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT :When enabled, also use speed limits of wagons for deciding the maximum speed of a train
|
||||
STR_CONFIG_SETTING_SLOW_ROAD_VEHICLES_IN_CURVES :Road vehicles slow down in curves: {STRING2}
|
||||
STR_CONFIG_SETTING_SLOW_ROAD_VEHICLES_IN_CURVES_HELPTEXT :When enabled, road vehicles slow down in curves. (Only with realistic acceleration)
|
||||
STR_CONFIG_SETTING_DISABLE_ELRAILS :Disable electric rails: {STRING2}
|
||||
STR_CONFIG_SETTING_DISABLE_ELRAILS_HELPTEXT :Enabling this setting disables the requirement to electrify tracks to make electric engines run on them
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -1929,6 +1929,7 @@ static SettingsContainer &GetSettingsTree()
|
||||
physics->Add(new SettingEntry("vehicle.plane_speed"));
|
||||
physics->Add(new SettingEntry("vehicle.ship_collision_avoidance"));
|
||||
physics->Add(new SettingEntry("vehicle.roadveh_articulated_overtaking"));
|
||||
physics->Add(new SettingEntry("vehicle.slow_road_vehicles_in_curves"));
|
||||
}
|
||||
|
||||
SettingsPage *routing = vehicles->Add(new SettingsPage(STR_CONFIG_SETTING_VEHICLES_ROUTING));
|
||||
|
@ -570,6 +570,7 @@ struct VehicleSettings {
|
||||
uint8 train_slope_steepness; ///< Steepness of hills for trains when using realistic acceleration
|
||||
uint8 roadveh_slope_steepness; ///< Steepness of hills for road vehicles when using realistic acceleration
|
||||
bool wagon_speed_limits; ///< enable wagon speed limits
|
||||
bool slow_road_vehicles_in_curves; ///< Road vehicles slow down in curves.
|
||||
bool disable_elrails; ///< when true, the elrails are disabled
|
||||
UnitID max_trains; ///< max trains in game per company
|
||||
UnitID max_roadveh; ///< max trucks in game per company
|
||||
|
@ -1647,9 +1647,18 @@ strhelp = STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT
|
||||
proc = UpdateConsists
|
||||
|
||||
;; vehicle.slow_road_vehicles_in_curves
|
||||
[SDT_NULL]
|
||||
length = 1
|
||||
[SDT_XREF]
|
||||
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP, SL_JOKER_1_25)
|
||||
xref = ""vehicle.slow_road_vehicles_in_curves""
|
||||
|
||||
[SDT_BOOL]
|
||||
base = GameSettings
|
||||
var = vehicle.slow_road_vehicles_in_curves
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_SLOW_ROAD_VEHICLES_IN_CURVES
|
||||
strhelp = STR_CONFIG_SETTING_SLOW_ROAD_VEHICLES_IN_CURVES_HELPTEXT
|
||||
cat = SC_BASIC
|
||||
patxname = ""slow_road_vehicles_in_curves.vehicle.slow_road_vehicles_in_curves""
|
||||
|
||||
;; vehicle.train_speed_adaption
|
||||
[SDT_NULL]
|
||||
|
Loading…
Reference in New Issue
Block a user