TE LINE

From Sven Co-op
Jump to navigation Jump to search
TE_LINE

Draws a dotted line between two points. Colors with green in them don't seem to work very well.

void te_line(Vector start, Vector end, uint16 life=32, RGBA c=RGBA_PURPLE,
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_LINE);
	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(life);
	m.WriteByte(c.r);
	m.WriteByte(c.g);
	m.WriteByte(c.b);
	m.End();
}
  • Vector start Starting point for the line
  • Vector end End point for the line
  • uint16 life Time to display the line (seconds * 0.1)
  • RGBA c Line color