-
Notifications
You must be signed in to change notification settings - Fork 4
TE_SPRAY
GeckoN edited this page Jan 27, 2017
·
4 revisions
Throws sprites or models in some direction.

| 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 |
No API function exists as of SC 5.10
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();
}
