summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2009-01-05 20:29:05 +0000
committermichi_cc <michi_cc@openttd.org>2009-01-05 20:29:05 +0000
commit13f06c812def363ef6679e2020187bb3946fdb55 (patch)
treea341d6426ade65385c5b09054f25729b81502151
parentc9d25e20f0e1bf93e5a28e788ac863529e362dc5 (diff)
downloadopenttd-13f06c812def363ef6679e2020187bb3946fdb55.tar.xz
(svn r14852) -Feature: Automatic reversing in front of block signals can now be disabled by setting pf.wait_oneway_signal respectively pf.wait_twoway_signal to 255.
-rw-r--r--src/settings.cpp4
-rw-r--r--src/train_cmd.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 3d1edde81..7fae6bfcc 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1342,8 +1342,8 @@ const SettingDesc _patch_settings[] = {
SDT_VAR(GameSettings, vehicle.extend_vehicle_life, SLE_UINT8, 0, 0, 0, 0, 100, 0, STR_NULL, NULL),
SDT_VAR(GameSettings, economy.dist_local_authority, SLE_UINT8, 0, 0, 20, 5, 60, 0, STR_NULL, NULL),
- SDT_VAR(GameSettings, pf.wait_oneway_signal, SLE_UINT8, 0, 0, 15, 2, 100, 0, STR_NULL, NULL),
- SDT_VAR(GameSettings, pf.wait_twoway_signal, SLE_UINT8, 0, 0, 41, 2, 100, 0, STR_NULL, NULL),
+ SDT_VAR(GameSettings, pf.wait_oneway_signal, SLE_UINT8, 0, 0, 15, 2, 255, 0, STR_NULL, NULL),
+ SDT_VAR(GameSettings, pf.wait_twoway_signal, SLE_UINT8, 0, 0, 41, 2, 255, 0, STR_NULL, NULL),
SDT_CONDLISTO(GameSettings, economy.town_noise_population, 3, SLE_UINT16, 96, SL_MAX_VERSION, 0,D0, "800,2000,4000", STR_NULL, NULL, CheckNoiseToleranceLevel),
SDT_CONDVAR(GameSettings, pf.wait_for_pbs_path, SLE_UINT8,100, SL_MAX_VERSION, 0, 0, 30, 2, 255, 0, STR_NULL, NULL),
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index ea4a80674..1d097f680 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3734,12 +3734,12 @@ static void TrainController(Vehicle *v, Vehicle *nomove, bool update_image)
v->cur_speed = 0;
v->subspeed = 0;
v->progress = 255 - 100;
- if (++v->load_unload_time_rem < _settings_game.pf.wait_oneway_signal * 20) return;
+ if (_settings_game.pf.wait_oneway_signal == 255 || ++v->load_unload_time_rem < _settings_game.pf.wait_oneway_signal * 20) return;
} else if (HasSignalOnTrackdir(gp.new_tile, i)) {
v->cur_speed = 0;
v->subspeed = 0;
v->progress = 255 - 10;
- if (++v->load_unload_time_rem < _settings_game.pf.wait_twoway_signal * 73) {
+ if (_settings_game.pf.wait_twoway_signal == 255 || ++v->load_unload_time_rem < _settings_game.pf.wait_twoway_signal * 73) {
DiagDirection exitdir = TrackdirToExitdir(i);
TileIndex o_tile = TileAddByDiagDir(gp.new_tile, exitdir);