(svn r23676) -Fix [FS#4913] (r23412): when removing road stops the wrong tile was checked for updating the infrastructure cache

This commit is contained in:
rubidium 2011-12-27 13:45:30 +00:00
parent 3f7b812891
commit 2c09939bd3

View File

@ -2003,7 +2003,7 @@ CommandCost CmdRemoveRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
/* Update company infrastructure counts. */
RoadType rt;
FOR_EACH_SET_ROADTYPE(rt, rts) {
Company *c = Company::GetIfValid(GetRoadOwner(tile, rt));
Company *c = Company::GetIfValid(GetRoadOwner(cur_tile, rt));
if (c != NULL) {
c->infrastructure.road[rt] += CountBits(road_bits);
DirtyCompanyInfrastructureWindows(c->index);