Changeset - r25157:caa589baeb75
[Not reviewed]
master
0 1 0
Peter Nelson - 4 years ago 2021-04-10 17:29:21
peter1138@openttd.org
Fix #8981: Don't attempt to re-reserve path if already entering/entered depot.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/rail_cmd.cpp
Show inline comments
 
@@ -1194,13 +1194,13 @@ CommandCost CmdBuildSingleSignal(TileInd
 
			uint mask = GetPresentSignals(tile) & SignalOnTrack(track);
 
			SetSignalStates(tile, (GetSignalStates(tile) & ~mask) | ((HasBit(GetRailReservationTrackBits(tile), track) && EnsureNoVehicleOnGround(tile).Succeeded() ? UINT_MAX : 0) & mask));
 
		}
 
		MarkTileDirtyByTile(tile);
 
		AddTrackToSignalBuffer(tile, track, _current_company);
 
		YapfNotifyTrackLayoutChange(tile, track);
 
		if (v != nullptr) {
 
		if (v != nullptr && v->track != TRACK_BIT_DEPOT) {
 
			/* Extend the train's path if it's not stopped or loading, or not at a safe position. */
 
			if (!(((v->vehstatus & VS_STOPPED) && v->cur_speed == 0) || v->current_order.IsType(OT_LOADING)) ||
 
					!IsSafeWaitingPosition(v, v->tile, v->GetVehicleTrackdir(), true, _settings_game.pf.forbid_90_deg)) {
 
				TryPathReserve(v, true);
 
			}
 
		}
0 comments (0 inline, 0 general)