You'll probably want to change when the character/gun is mirrored to depending on which side the mouse is on compared to the character.
character is not mirrored
mouse.x < character.x
character is mirrored
mouse.x > character.x
->set not mirrored
you'll need to rotate the guns sprite 90 degree's so it is upright. This will keep it pointing the same direction when it is mirrored.
->set gun.angle(character.x,character.y,mouse.x,mouse.y)+90 [or do -90 if you rotated the sprite the other way]