A military judge or summary court-martial officer may punish for contempt any person who uses any menacing word, sign, or gesture in its presence, or who disturbs its proceedings by any riot or disorder. A person subject to this code may be punished for contempt by confinement not to exceed five days or a fine of one hundred dollars ($100), or both. A person not subject to this code may be punished for contempt by a military court in the same manner as a criminal court of the state.