Regardless of whether he is a LEO or in the military shooting through walls is dumb. It is unsafe, inaccurate, gives away your position, and limits the amount of shots you have to really defend yourself if he comes into the room.
If you are held up in a bedroom and you hear the guy outside you...