Gluon Gun - How were the effects made and handled online?

I’ve been trying to develop a beam weapon similar to the Egon (basically an Egon 2.0 for an HL2DM mod) in a Source Engine mod of mine, but the existing code makes it damn near impossible to make a really nice constant beam that can update position on all clients without spamming particles every frame, eating up tons of bandwidth, and not looking as good as it could. The old HL:Source method of using a CBeam is also very jittery/jumpy and doesn’t predict properly as well.

I am wondering, would a BMS dev be willing to shed some light, if not some source code examples on how the Egon’s beam effect worked? Or at the very least, could someone give me an example of how I can do the following:

  • Create a constant beam particle, attached to weapon muzzle (either world or view model, depending on perspective), and set the 2nd control point’s location in the world.
  • Update the 2nd control point’s location each frame to follow your point of aim. Position updates being synced with other clients. (I already know how to get the point of aim, but not how to manipulate an existing particle to change a control point’s position.)
  • Destroy the particle effect when done firing and/or when weapon is holstered. (I once had this sort of working, but it crashed if a player died while firing.)
  • All of this needs to be predictable, and be visible to and from other players.

Maybe You can use hl:Source effect ?

Did you even read my post?

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.