From a63bc23f04bb722647c608df5538a5a2459b62f7 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sat, 29 Aug 2020 13:27:18 +0100 Subject: [PATCH] Debug: Add various train fields to the vehicle debug window --- src/table/newgrf_debug_data.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h index e184331ab6..0f3a2ff3b9 100644 --- a/src/table/newgrf_debug_data.h +++ b/src/table/newgrf_debug_data.h @@ -143,6 +143,12 @@ class NIHVehicle : public NIHelper { gvc.cached_total_length, gvc.cached_veh_length); print(buffer); } + if (v->type == VEH_TRAIN) { + const Train *t = Train::From(v); + seprintf(buffer, lastof(buffer), " Wait counter: %u, rev distance: %u, TBSN: %u, speed restriction: %u", + t->wait_counter, t->reverse_distance, t->tunnel_bridge_signal_num, t->speed_restriction); + print(buffer); + } if (HasBit(v->vehicle_flags, VF_SEPARATION_ACTIVE)) { std::vector progress_array = PopulateSeparationState(v);