The court convicting a person of an offence against section 147.1 or 149.1 of the Criminal Code that relates to a member, special member, protective service officer or special protective service officer may, order the offender to pay such compensation as the court thinks fit for any damage or injury caused by the offender to the uniform, clothing or accoutrements of the member, special member, protective service officer or special protective service officer concerned or for any medical or other expenses incurred in consequence of personal injury sustained by him or her by reason of the offence.