From 35dc377a58c90abb67304a0c557449b6db3c0d3f Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 8 Dec 2019 12:16:11 +0000 Subject: [PATCH] Fix: Infrastructure total update when removing tram road stop The wrong road owner was used when updating the tram infrastructure total. This could result in desyncs, negative infrastructure totals, etc. --- src/station_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 78a0896eae..aa5afb97ce 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2126,7 +2126,7 @@ CommandCost CmdRemoveRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, ui /* Update company infrastructure counts. */ int count = CountBits(road_bits); UpdateCompanyRoadInfrastructure(road_type[RTT_ROAD], road_owner[RTT_ROAD], count); - UpdateCompanyRoadInfrastructure(road_type[RTT_TRAM], road_owner[RTT_ROAD], count); + UpdateCompanyRoadInfrastructure(road_type[RTT_TRAM], road_owner[RTT_TRAM], count); } }