Changeset - r38:db208b6bf8ce
[Not reviewed]
master
0 1 0
darkvater - 20 years ago 2004-08-13 17:41:44
darkvater@openttd.org
(svn r39) -Fix [1008605] Signals not updated after ClearTunnel Bug [985920] (TrueLight)
1 file changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
tunnelbridge_cmd.c
Show inline comments
 
@@ -630,10 +630,14 @@ static int32 DoClearTunnel(uint tile, ui
 
	}
 

	
 
	if (flags & DC_EXEC) {
 
		// We first need to request the direction before calling DoClearSquare
 
		//  else the direction is always 0.. dah!! ;)
 
		byte tile_dir = _map5[tile]&3;
 
		byte endtile_dir = _map5[endtile]&3;
 
		DoClearSquare(tile);
 
		DoClearSquare(endtile);
 
		UpdateSignalsOnSegment(tile, _updsignals_tunnel_dir[_map5[tile]&3]);
 
		UpdateSignalsOnSegment(endtile, _updsignals_tunnel_dir[_map5[endtile]&3]);
 
		UpdateSignalsOnSegment(tile, _updsignals_tunnel_dir[tile_dir]);
 
		UpdateSignalsOnSegment(endtile, _updsignals_tunnel_dir[endtile_dir]);
 
		if (_map_owner[tile] == OWNER_TOWN && _game_mode != GM_EDITOR) 
 
			ChangeTownRating(t, -250, 0);
 
	}
0 comments (0 inline, 0 general)