TE TRACER

From Sven Co-op
Revision as of 21:01, 5 April 2025 by Outerbeast (talk | contribs) (Created page with "Standard bullet tracer effect. Colour of this effect is determined by tracerred, tracergreen and tracerblue cvars, opacity by traceralpha, speed by tracerspeed, distance from...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Standard bullet tracer effect.

Colour of this effect is determined by tracerred, tracergreen and tracerblue cvars, opacity by traceralpha, speed by tracerspeed, distance from the startpoint where the tracer will appear by traceroffset and finally length by tracerlength cvar.

See also TE_USERTRACER effect.

TE TRACER.gif
void te_tracer(Vector start, Vector end, 
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_TRACER);
	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.End();
}