Changeset - r5:283cc53559b4
[Not reviewed]
master
0 1 0
darkvater - 20 years ago 2004-08-10 14:50:42
darkvater@openttd.org
(svn r6) -Fix [1006530] BuildRoadOutsideStation fix. Fix bug [994720] road depot - bus/lorry station (Truelight+Darkvater :P )
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
road_gui.c
Show inline comments
 
@@ -52,25 +52,26 @@ static void CcBuildTunnel(bool success, 
 
	}
 
}
 

	
 
static void PlaceRoad_Tunnel(uint tile)
 
{
 
	DoCommandP(tile, 0x200, 0, CcBuildTunnel, CMD_BUILD_TUNNEL | CMD_AUTO | CMD_MSG(STR_5016_CAN_T_BUILD_TUNNEL_HERE));
 
}
 

	
 
static void BuildRoadOutsideStation(uint tile, int direction)
 
{
 
	static const byte _roadbits_by_dir[4] = {2,1,8,4};
 
	tile += _tileoffs_by_dir[direction];
 
	if (IS_TILETYPE(tile, MP_STREET)) {
 
	// if there is a roadpiece just outside of the station entrance, build a connecting route
 
	if (IS_TILETYPE(tile, MP_STREET) && !(_map5[tile]&0x20)) {
 
		DoCommandP(tile, _roadbits_by_dir[direction], 0, NULL, CMD_BUILD_ROAD);
 
	}
 
}
 

	
 
static void CcDepot(bool success, uint tile, uint32 p1, uint32 p2)
 
{
 
	if (success) {
 
		SndPlayTileFx(0x1D, tile);
 
		ResetObjectToPlace();
 
		BuildRoadOutsideStation(tile, (int)p1);
 
	}
 
}
0 comments (0 inline, 0 general)