Skip to content

TE_SPRAY

GeckoN edited this page Jan 27, 2017 · 4 revisions

Throws sprites or models in some direction.

Parameters

Type Name Description
Vector pos Point to spray sprites from
Vector dir Direction of the spray
string model Sprite or model to display
uint8 count Number of sprites/models to spawn
uint8 speed Initial sprite/model speed
uint8 noise Amount to randomize speed and direction
uint8 renderMode Render mode

API Function

No API function exists as of SC 5.10

NetworkMessage Function

void te_spray(Vector pos, Vector dir, 
    string model="sprites/bubble.spr", uint8 count=8, 
    uint8 speed=16, uint8 noise=255, uint8 renderMode=kRenderTransAlpha,
    NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
    NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
    m.WriteByte(TE_SPRAY);
    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.WriteShort(g_EngineFuncs.ModelIndex(model));
    m.WriteByte(count);
    m.WriteByte(speed);
    m.WriteByte(noise);
	m.WriteByte(renderMode);
    m.End();
}

Clone this wiki locally