(1) Any person who knowingly or recklessly discharges a firearm into any dwelling or any other building or occupied structure, or into any motor vehicle occupied by any person, commits the offense of illegal discharge of a firearm.
(2) It shall not be an offense under this section if the person who discharges a firearm in violation of subsection (1) of this section is a peace officer as described in section 16-2.5-101, C.R.S., acting within the scope of such officer's authority and in the performance of such officer's duties.
(3) Illegal discharge of a firearm is a class 5 felony.