summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorJonathan G Rennison <j.g.rennison@gmail.com>2019-12-08 12:16:11 +0000
committerMichael Lutz <michi@icosahedron.de>2019-12-08 15:12:56 +0100
commit35dc377a58c90abb67304a0c557449b6db3c0d3f (patch)
treebc89ce9aba95c0658b3dd0b878f75b06ce94a11f /src/station_cmd.cpp
parent03bbae7fe9a24d894731d545a79697362588bcca (diff)
downloadopenttd-35dc377a58c90abb67304a0c557449b6db3c0d3f.tar.xz
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.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 78a0896ea..aa5afb97c 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);
}
}