Skip to content

TE_MULTIGUNSHOT

GeckoN edited this page Jan 31, 2017 · 4 revisions

Applies multiple decals on the targgeted surface (brush entity or world). A ricochet sound effect is played if count is >= 3. No tracers are shown and monsters are ignored.

Unlike the other decal methods, the position of a decal is determined by the intersection of a shoot vector and a wall.

Parameters

Type Name Description
Vector pos Location to shoot from
Vector dir Shoot direction
float spreadX Amount to randomize direction for each trace/decal (horizontal)
float spreadY Amount to randomize direction for each trace/decal (vertical)
uint8 count Number of bullets to shoot / decals to apply
string decal Texture name from decals.wad

API Function

No API function exists as of SC 5.02

NetworkMessage Function

void te_multigunshot(Vector pos, Vector dir, float spreadX=512.0f, 
	float spreadY=512.0f, uint8 count=8, string decal="{shot4",
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{   
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_MULTIGUNSHOT);
	m.WriteCoord(pos.x);
	m.WriteCoord(pos.y);
	m.WriteCoord(pos.z);
	m.WriteCoord(dir.x);
	m.WriteCoord(dir.y);
	m.WriteCoord(dir.z);
	m.WriteCoord(spreadX);
	m.WriteCoord(spreadY);
	m.WriteByte(count);
	m.WriteByte(g_EngineFuncs.DecalIndex(decal));
	m.End();
}
Clone this wiki locally