Merge branch 'save_ext' into jgrpp

# Conflicts:
#	config.lib
#	src/misc_gui.cpp
#	src/network/network_gui.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/smallmap_gui.h
#	src/station_cmd.cpp
#	src/toolbar_gui.cpp
#	src/vehicle_gui.cpp
#	src/window.cpp
This commit is contained in:
Jonathan G Rennison
2019-01-14 00:01:44 +00:00
147 changed files with 1026 additions and 330 deletions

View File

@@ -2512,12 +2512,10 @@ static bool CheckTrainStayInDepot(Train *v)
seg_state = _settings_game.pf.reserve_paths ? SIGSEG_PBS : UpdateSignalsOnSegment(v->tile, INVALID_DIAGDIR, v->owner);
}
/* We are leaving a depot, but have to go to the exact same one; re-enter */
/* We are leaving a depot, but have to go to the exact same one; re-enter. */
if (v->current_order.IsType(OT_GOTO_DEPOT) && v->tile == v->dest_tile) {
/* We need to have a reservation for this to work. */
if (HasDepotReservation(v->tile)) return true;
SetDepotReservation(v->tile, true);
VehicleEnterDepot(v);
/* Service when depot has no reservation. */
if (!HasDepotReservation(v->tile)) VehicleEnterDepot(v);
return true;
}
@@ -3973,12 +3971,12 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse)
if (!HasSignalOnTrackdir(gp.new_tile, ReverseTrackdir(i))) {
v->cur_speed = 0;
v->subspeed = 0;
v->progress = 255 - 100;
v->progress = 255; // make sure that every bit of acceleration will hit the signal again, so speed stays 0.
if (!_settings_game.pf.reverse_at_signals || ++v->wait_counter < _settings_game.pf.wait_oneway_signal * 20) return false;
} else if (HasSignalOnTrackdir(gp.new_tile, i)) {
v->cur_speed = 0;
v->subspeed = 0;
v->progress = 255 - 10;
v->progress = 255; // make sure that every bit of acceleration will hit the signal again, so speed stays 0.
if (!_settings_game.pf.reverse_at_signals || ++v->wait_counter < _settings_game.pf.wait_twoway_signal * 73) {
DiagDirection exitdir = TrackdirToExitdir(i);
TileIndex o_tile = TileAddByDiagDir(gp.new_tile, exitdir);