Changeset - r24323:0772be16e3f4
[Not reviewed]
master
0 1 0
dP - 4 years ago 2020-07-12 13:38:35
dp@dpointer.org
Fix: Set invalid road and tram types for rail tunnel ends
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/tunnel_map.h
Show inline comments
 
@@ -7,12 +7,13 @@
 

	
 
/** @file tunnel_map.h Map accessors for tunnels. */
 

	
 
#ifndef TUNNEL_MAP_H
 
#define TUNNEL_MAP_H
 

	
 
#include "rail_map.h"
 
#include "road_map.h"
 

	
 

	
 
/**
 
 * Is this a tunnel (entrance)?
 
 * @param t the tile that might be a tunnel
 
@@ -76,10 +77,12 @@ static inline void MakeRailTunnel(TileIn
 
	_m[t].m2 = 0;
 
	_m[t].m3 = 0;
 
	_m[t].m4 = 0;
 
	_m[t].m5 = TRANSPORT_RAIL << 2 | d;
 
	SB(_me[t].m6, 2, 4, 0);
 
	_me[t].m7 = 0;
 
	_me[t].m8 = r;
 
	_me[t].m8 = 0;
 
	SetRailType(t, r);
 
	SetRoadTypes(t, INVALID_ROADTYPE, INVALID_ROADTYPE);
 
}
 

	
 
#endif /* TUNNEL_MAP_H */
0 comments (0 inline, 0 general)