Do 4 Line trace in forward direction once shoot button is pressed.one in camera location .second in cameralocation +(0,0,50),third in cameralocation +(50,0,0).fourth in cameralocation +(-50,0,0).this way you can know if one of directions is free and one is blocked by cover.first do from camera which is normal shooting location and if it was not blocked untill a reasonable distance do normal shoot.else trace to see which direction is free and play a anim for that direction and shoot . this is a hard feature specially in anim part and might take a while to implement.
p.s change 50 based on need.