The commanding officer of any of the military forces of the state of Washington engaged under the order of proper authority in the suppression of insurrection, the dispersion of a mob, the protection of life or property, or the enforcement of the laws, shall exercise discretion as to the propriety of the means to be used in controlling or dispersing of any mob or other unlawful assembly and, if he or she exercises his or her honest judgment thereon, he or she shall not be liable in either a civil or criminal action for any act done in line of duty.