It's understandable, however Rick was facing Deanna when she initially called his name as she was holding her dead husband. Soon as she said "do it" he turned close to 180 degrees towards the front where Pete was on the ground then shot. Once he shot he looked directly up and saw Morgan, Daryl, and Aaron - which were also at the gate.
I'm not saying I'm right, I'm not saying you're wrong, but I highly doubt he shot Reg and not Pete.