(svn r25302) -Fix [FS#5565]: Build railway fences next to objects, even if they are owned by the same company.
This commit is contained in:
		| @@ -32,6 +32,7 @@ | |||||||
| #include "date_func.h" | #include "date_func.h" | ||||||
| #include "strings_func.h" | #include "strings_func.h" | ||||||
| #include "company_gui.h" | #include "company_gui.h" | ||||||
|  | #include "object_map.h" | ||||||
|  |  | ||||||
| #include "table/strings.h" | #include "table/strings.h" | ||||||
| #include "table/railtypes.h" | #include "table/railtypes.h" | ||||||
| @@ -2569,9 +2570,9 @@ static void TileLoop_Track(TileIndex tile) | |||||||
|  |  | ||||||
| 			TileIndex tile2 = tile + TileOffsByDiagDir(d); | 			TileIndex tile2 = tile + TileOffsByDiagDir(d); | ||||||
|  |  | ||||||
| 			/* Show fences if it's a house, industry, road, tunnelbridge or not owned by us. */ | 			/* Show fences if it's a house, industry, object, road, tunnelbridge or not owned by us. */ | ||||||
| 			if (!IsValidTile(tile2) || IsTileType(tile2, MP_HOUSE) || IsTileType(tile2, MP_INDUSTRY) || | 			if (!IsValidTile(tile2) || IsTileType(tile2, MP_HOUSE) || IsTileType(tile2, MP_INDUSTRY) || | ||||||
| 					IsTileType(tile2, MP_ROAD) || IsTileType(tile2, MP_TUNNELBRIDGE) || !IsTileOwner(tile2, owner)) { | 					IsTileType(tile2, MP_ROAD) || (IsTileType(tile2, MP_OBJECT) && !IsOwnedLand(tile2)) || IsTileType(tile2, MP_TUNNELBRIDGE) || !IsTileOwner(tile2, owner)) { | ||||||
| 				fences |= 1 << d; | 				fences |= 1 << d; | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 frosch
					frosch