(svn r11649) -Codechange: some code can be simplified thanks to changes in r11642

This commit is contained in:
smatz
2007-12-16 19:30:42 +00:00
parent 0730b9afc1
commit 145517fb8e
15 changed files with 84 additions and 190 deletions

View File

@@ -3059,7 +3059,7 @@ static void DeleteLastWagon(Vehicle *v)
if (GetVehicleTunnelBridge(v->tile, endtile) != NULL) return; // tunnel / bridge is busy
DiagDirection dir = IsTunnel(v->tile) ? GetTunnelBridgeDirection(v->tile) : GetTunnelBridgeDirection(v->tile);
DiagDirection dir = GetTunnelBridgeDirection(v->tile);
/* v->direction is "random", so it cannot be used to determine the direction of the track */
UpdateSignalsOnSegment(v->tile, dir);
@@ -3176,7 +3176,7 @@ static bool TrainCheckIfLineEnds(Vehicle *v)
TileIndex tile = v->tile;
if (IsTileType(tile, MP_TUNNELBRIDGE)) {
DiagDirection dir = IsTunnel(tile) ? GetTunnelBridgeDirection(tile) : GetTunnelBridgeDirection(tile);
DiagDirection dir = GetTunnelBridgeDirection(tile);
if (DiagDirToDir(dir) == v->direction) return true;
}