Add scope info logging to LoadUnloadVehicle

This commit is contained in:
Jonathan G Rennison
2018-05-31 18:53:39 +01:00
parent 4aa211e454
commit a33153979e

View File

@@ -53,6 +53,7 @@
#include "linkgraph/refresh.h" #include "linkgraph/refresh.h"
#include "tracerestrict.h" #include "tracerestrict.h"
#include "tbtr_template_vehicle.h" #include "tbtr_template_vehicle.h"
#include "scope_info.h"
#include "table/strings.h" #include "table/strings.h"
#include "table/pricebase.h" #include "table/pricebase.h"
@@ -1679,6 +1680,8 @@ static void LoadUnloadVehicle(Vehicle *front)
if (front->type == VEH_TRAIN) station_vehicle = Train::From(front)->GetStationLoadingVehicle(); if (front->type == VEH_TRAIN) station_vehicle = Train::From(front)->GetStationLoadingVehicle();
TileIndex station_tile = station_vehicle->tile; TileIndex station_tile = station_vehicle->tile;
SCOPE_INFO_FMT([&], "LoadUnloadVehicle: %s, %s, %s, %X", scope_dumper().StationInfo(st), scope_dumper().VehicleInfo(front), scope_dumper().VehicleInfo(station_vehicle), station_tile);
bool pull_through_mode = false; bool pull_through_mode = false;
bool load_unload_not_yet_in_station = false; bool load_unload_not_yet_in_station = false;
if (front->type == VEH_TRAIN && front->cur_real_order_index < front->GetNumOrders()) { if (front->type == VEH_TRAIN && front->cur_real_order_index < front->GetNumOrders()) {