TE BEAMSPRITE

From Sven Co-op
Revision as of 13:37, 16 April 2025 by Outerbeast (talk | contribs) (Created page with "A beam with a sprite at the end. It appears to be completely useless since it's only visible for a single frame and there is no way to increase its life time. Please, someone...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A beam with a sprite at the end.

It appears to be completely useless since it's only visible for a single frame and there is no way to increase its life time. Please, someone correct me if I'm wrong.

TE_BEAMSPRITE
void te_beamsprite(Vector start, Vector end,
	string beamSprite="sprites/laserbeam.spr", 
	string endSprite="sprites/glow01.spr",
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_BEAMSPRITE);
	m.WriteCoord(start.x);
	m.WriteCoord(start.y);
	m.WriteCoord(start.z);
	m.WriteCoord(end.x);
	m.WriteCoord(end.y);
	m.WriteCoord(end.z);
	m.WriteShort(g_EngineFuncs.ModelIndex(beamSprite));
	m.WriteShort(g_EngineFuncs.ModelIndex(endSprite));
	m.End();
}
Vector start Starting position of the beam
Vector end End position of the beam
string beamSprite Sprite used to display the beam
string endSprite Additive sprite drawn at the end of the beam