Changeset - r5914:0835443bb2ba
[Not reviewed]
master
0 1 0
KUDr - 17 years ago 2007-02-02 20:20:56
kudr@openttd.org
(svn r8540) -Fix[YAPF]: Assert when buoy is placed on NE or NW map edge (Dan)
1 file changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -2134,7 +2134,14 @@ static uint32 GetTileTrackStatus_Station
 

	
 
		case TRANSPORT_WATER:
 
			// buoy is coded as a station, it is always on open water
 
			if (IsBuoy(tile)) return TRACK_BIT_ALL * 0x101;
 
			if (IsBuoy(tile)) {
 
				TrackBits ts = TRACK_BIT_ALL;
 
				// remove tracks that connect NE map edge
 
				if (TileX(tile) == 0) ts &= ~(TRACK_BIT_X | TRACK_BIT_UPPER | TRACK_BIT_RIGHT);
 
				// remove tracks that connect NW map edge
 
				if (TileY(tile) == 0) ts &= ~(TRACK_BIT_Y | TRACK_BIT_LEFT | TRACK_BIT_UPPER);
 
				return uint32(ts) * 0x101;
 
			}
 
			break;
 

	
 
		case TRANSPORT_ROAD:
0 comments (0 inline, 0 general)