mirror of https://github.com/OpenTTD/OpenTTD
(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
parent
5b49c9de65
commit
9a49a60048
|
@ -253,7 +253,7 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec
|
||||||
assert(IsDriveThroughStopTile(tile));
|
assert(IsDriveThroughStopTile(tile));
|
||||||
cost.AddCost(_price[PR_CLEAR_ROAD] * 2);
|
cost.AddCost(_price[PR_CLEAR_ROAD] * 2);
|
||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
Company *c = Company::GetIfValid(GetTileOwner(tile));
|
Company *c = Company::GetIfValid(GetRoadOwner(tile, rt));
|
||||||
if (c != NULL) {
|
if (c != NULL) {
|
||||||
/* A full diagonal road tile has two road bits. */
|
/* A full diagonal road tile has two road bits. */
|
||||||
c->infrastructure.road[rt] -= 2;
|
c->infrastructure.road[rt] -= 2;
|
||||||
|
|
Loading…
Reference in New Issue