Changeset - r20295:beffb97ca5d3
[Not reviewed]
master
0 1 0
frosch - 11 years ago 2013-05-29 17:13:53
frosch@openttd.org
(svn r25302) -Fix [FS#5565]: Build railway fences next to objects, even if they are owned by the same company.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/rail_cmd.cpp
Show inline comments
 
@@ -29,12 +29,13 @@
 
#include "pbs.h"
 
#include "company_base.h"
 
#include "core/backup_type.hpp"
 
#include "date_func.h"
 
#include "strings_func.h"
 
#include "company_gui.h"
 
#include "object_map.h"
 

	
 
#include "table/strings.h"
 
#include "table/railtypes.h"
 
#include "table/track_land.h"
 

	
 
/** Helper type for lists/vectors of trains */
 
@@ -2566,15 +2567,15 @@ static void TileLoop_Track(TileIndex til
 

	
 
			/* Track bit on this edge => no fence. */
 
			if ((rail & dir_to_trackbits[d]) != TRACK_BIT_NONE) continue;
 

	
 
			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) ||
 
					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;
 
			}
 
		}
 

	
 
		switch (fences) {
 
			case 0: break;
0 comments (0 inline, 0 general)