(svn r26974) [1.4] -Backport from trunk:

- Fix: Owner of road depot road types were not properly changed upon bankruptcy [FS#6126] (r26955)
This commit is contained in:
frosch
2014-10-06 20:18:11 +00:00
committed by Sergii Pylypenko
parent 8bb7c08599
commit c23159f486
3 changed files with 9 additions and 3 deletions

View File

@@ -1763,6 +1763,11 @@ static void ChangeTileOwner_Road(TileIndex tile, Owner old_owner, Owner new_owne
Company::Get(new_owner)->infrastructure.road[rt] += 2;
SetTileOwner(tile, new_owner);
for (RoadType rt = ROADTYPE_ROAD; rt < ROADTYPE_END; rt++) {
if (GetRoadOwner(tile, rt) == old_owner) {
SetRoadOwner(tile, rt, new_owner);
}
}
}
}
return;