Notwithstanding the provisions of RSA 644:2, III(a) or any other law to the contrary, no person who owns, operates, or uses a shooting range in this state shall be subject to civil liability or criminal prosecution in any matter relating to noise or noise pollution, provided that the owners of the range are in compliance with any applicable noise control ordinances in existence at the time the range was established, was constructed, or began operations.