It ALMOST looked like he intentionally did it. There was quite a long enough pause from the moment the guy started his move sideways, to the moment he raised his gun an fired. It almost looked like he was waiting for that moment. I dunno, to me it looks intentional.
Maybe that was his superior, whom he brought decaf coffee to, instead of regular accidentally, and got chewed out in front of the rest of the squad like a little child. So this was his payback for the embarrassment. All over coffee.
It doesn't look like he was tracking the front guy at all. Looks like he went to take a shot, and the guy in front stepped in front of him unexpectedly.