src/tunnelbridge_cmd.cpp
branchgamebalance
changeset 9907 3b068c3a1c74
parent 9906 6f41b8713b65
child 9908 0fa543611bbe
equal deleted inserted replaced
9906:6f41b8713b65 9907:3b068c3a1c74
   694 	}
   694 	}
   695 
   695 
   696 	return CMD_ERROR;
   696 	return CMD_ERROR;
   697 }
   697 }
   698 
   698 
       
   699 /**
       
   700  * Switches the rail type for a tunnel or a bridgehead. As the railtype
       
   701  * on the bridge are determined by the one of the bridgehead, this
       
   702  * functions converts the railtype on the entire bridge.
       
   703  * @param tile        The tile on which the railtype is to be convert.
       
   704  * @param totype      The railtype we want to convert to
       
   705  * @param exec        Switches between test and execute mode
       
   706  * @return            The cost and state of the operation
       
   707  * @retval CMD_ERROR  An error occured during the operation.
       
   708  */
   699 int32 DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec)
   709 int32 DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec)
   700 {
   710 {
   701 	TileIndex endtile;
   711 	TileIndex endtile;
   702 
   712 
   703 	if (IsTunnel(tile) && GetTunnelTransportType(tile) == TRANSPORT_RAIL) {
   713 	if (IsTunnel(tile) && GetTunnelTransportType(tile) == TRANSPORT_RAIL) {