summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2012-01-24 19:24:02 +0000
committerrubidium <rubidium@openttd.org>2012-01-24 19:24:02 +0000
commit9a49a600481f10009fc5c0015fb395eecc115a90 (patch)
tree5a9976c0d1fd1f953bc1d6b376a0b77808afec8e /src
parent5b49c9de653b38d2ec74e9570862f79e42a46bf4 (diff)
downloadopenttd-9a49a600481f10009fc5c0015fb395eecc115a90.tar.xz
(svn r23847) -Fix: when removing road or tram from a tram+road stop, the owner of the road stop's cache was updated instead of the owner of the removed infrastructure
Diffstat (limited to 'src')
-rw-r--r--src/road_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 0f9f679c8..c20daa5a8 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -253,7 +253,7 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec
assert(IsDriveThroughStopTile(tile));
cost.AddCost(_price[PR_CLEAR_ROAD] * 2);
if (flags & DC_EXEC) {
- Company *c = Company::GetIfValid(GetTileOwner(tile));
+ Company *c = Company::GetIfValid(GetRoadOwner(tile, rt));
if (c != NULL) {
/* A full diagonal road tile has two road bits. */
c->infrastructure.road[rt] -= 2;