Changeset - r4304:0b74ee9735d1
[Not reviewed]
master
0 1 0
Darkvater - 18 years ago 2006-08-19 15:24:40
darkvater@openttd.org
(svn r5951) - Codechange: GetVehicleOutOfTunnelTile() never did anything, and making it work properly only resulted in massive performance drops, and it not working properly also seemed to work, so make it not work properly once again.
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
tunnelbridge_cmd.c
Show inline comments
 
@@ -1429,12 +1429,15 @@ static uint32 VehicleEnter_TunnelBridge(
 
 * Very similar to GetOtherTunnelEnd(), but we use the vehicle's
 
 * direction for determining which end of the tunnel to find
 
 * @param v the vehicle which is inside the tunnel and needs an exit
 
 * @return the exit-tile of the tunnel based on the vehicle's direction */
 
TileIndex GetVehicleOutOfTunnelTile(const Vehicle *v)
 
{
 
#if 1
 
	return v->tile;
 
#else
 
	TileIndex tile = v->tile;
 
	DiagDirection dir = DirToDiagDir(v->direction);
 
	TileIndexDiff delta = TileOffsByDir(dir);
 
	byte z = v->z_pos;
 

	
 
	dir = ReverseDiagDir(dir);
 
@@ -1444,12 +1447,13 @@ TileIndex GetVehicleOutOfTunnelTile(cons
 
		GetTileZ(tile) != z
 
	) {
 
		tile += delta;
 
	}
 

	
 
	return tile;
 
#endif
 
}
 

	
 
const TileTypeProcs _tile_type_tunnelbridge_procs = {
 
	DrawTile_TunnelBridge,					/* draw_tile_proc */
 
	GetSlopeZ_TunnelBridge,					/* get_slope_z_proc */
 
	ClearTile_TunnelBridge,					/* clear_tile_proc */
0 comments (0 inline, 0 general)