diff --git a/src/scope_info.cpp b/src/scope_info.cpp index 6410ad231d..c6d80fe475 100644 --- a/src/scope_info.cpp +++ b/src/scope_info.cpp @@ -87,7 +87,8 @@ const char *scope_dumper::StationInfo(const BaseStation *st) if (st) { const bool waypoint = Waypoint::IsExpected(st); - b += seprintf(b, last, "%s: %u: ", waypoint ? "waypoint" : "station", st->index); + b += seprintf(b, last, "%s: %u: (", waypoint ? "waypoint" : "station", st->index); + SetDParam(0, st->index); b = GetString(b, waypoint ? STR_WAYPOINT_NAME : STR_STATION_NAME, last); b += seprintf(b, last, ", c:%d, facil: ", (int) st->owner); auto dump_facil = [&](char c, StationFacility flag) { @@ -99,6 +100,7 @@ const char *scope_dumper::StationInfo(const BaseStation *st) dump_facil('A', FACIL_AIRPORT); dump_facil('D', FACIL_DOCK); dump_facil('W', FACIL_WAYPOINT); + b += seprintf(b, last, ")"); } else { b += seprintf(b, last, "station/waypoint: NULL"); } diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 1645a380cf..0644add6dc 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -951,8 +951,11 @@ void CallVehicleTicks() RunVehicleDayProc(); - Station *st; - FOR_ALL_STATIONS(st) LoadUnloadStation(st); + { + Station *st = nullptr; + SCOPE_INFO_FMT([&st], "CallVehicleTicks: LoadUnloadStation: %s", scope_dumper().StationInfo(st)); + FOR_ALL_STATIONS(st) LoadUnloadStation(st); + } Vehicle *v = NULL; SCOPE_INFO_FMT([&v], "CallVehicleTicks: %s", scope_dumper().VehicleInfo(v));