I don't follow. This code is not C or C++, so it's not actually from Quake. So what's with "this is how this was coded" and "here are the bugs, but it's only my guess"? The code is avaialble, why guess at all?
Hello, video creator here. This is indeed the actual code, and it is written in QuakeC, a language created specifically for the game logic in Quake. The part I'm not sure about is why the creators wanted to add in extra side beams at all.
I haven't played Quake in the better part of 20 years so I can't comment from first hand experience, but judging by your top-down view at around 41 seconds, the single beam visually seems to intersect with a bunch of enemies while not dealing any damage (probably as a combination of narrow hitboxes on both the beam and the enemies).