1
0
Fork 0

(svn r9949) -Fix: (road) depots got deowned on bankrupts.

release/0.6
rubidium 2007-05-26 23:18:42 +00:00
parent 35f1299d40
commit c69458d894
1 changed files with 6 additions and 4 deletions

View File

@ -1284,10 +1284,12 @@ static uint32 VehicleEnter_Road(Vehicle *v, TileIndex tile, int x, int y)
static void ChangeTileOwner_Road(TileIndex tile, PlayerID old_player, PlayerID new_player) static void ChangeTileOwner_Road(TileIndex tile, PlayerID old_player, PlayerID new_player)
{ {
if (GetRoadTileType(tile) == ROAD_TILE_DEPOT) { if (GetRoadTileType(tile) == ROAD_TILE_DEPOT) {
if (new_player == PLAYER_SPECTATOR) { if (GetTileOwner(tile) == old_player) {
DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR); if (new_player == PLAYER_SPECTATOR) {
} else { DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
SetTileOwner(tile, new_player); } else {
SetTileOwner(tile, new_player);
}
} }
return; return;
} }