File diff r23136:e0ce56841050 → r23137:30ea4915fb74
src/train_cmd.cpp
Show inline comments
 
@@ -2146,18 +2146,16 @@ static bool CheckTrainStayInDepot(Train 
 
			return true;
 
		}
 
	} else {
 
		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;
 
	}
 

	
 
	/* Only leave when we can reserve a path to our destination. */
 
	if (seg_state == SIGSEG_PBS && !TryPathReserve(v) && v->force_proceed == TFP_NONE) {
 
		/* No path and no force proceed. */