-
Notifications
You must be signed in to change notification settings - Fork 4
TE_BEAMDISK
GeckoN edited this page Jan 31, 2017
·
4 revisions
An additive sprite disk that expands over time. The orientation of the disk can't be changed.
Type | Name | Description |
---|---|---|
Vector | pos | Center point of the disk |
float | radius | Max radius of the disk |
string | sprite | Sprite used to cover the disk |
uint8 | startFrame | Starting frame for the disk sprite |
uint8 | frameRate | Frame rate of the disk sprite (FPS * 0.1) (has no effect) |
uint8 | life | Time to display the disk (seconds * 0.1) |
Color | c | Color of the disk sprite |
uint8 | scrollSpeed | If set to 10 or greater, the disk starts out fully stretched to infinity and appears to rotate. |
Values < 10 have no effect. |
No API function exists as of SC 5.02
void te_beamdisk(Vector pos, float radius,
string sprite="sprites/laserbeam.spr", uint8 startFrame=0,
uint8 frameRate=16, uint8 life=8, Color c=PURPLE, uint8 scrollSpeed=0,
NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
m.WriteByte(TE_BEAMDISK);
m.WriteCoord(pos.x);
m.WriteCoord(pos.y);
m.WriteCoord(pos.z);
m.WriteCoord(pos.x);
m.WriteCoord(pos.y);
m.WriteCoord(pos.z + radius);
m.WriteShort(g_EngineFuncs.ModelIndex(sprite));
m.WriteByte(startFrame);
m.WriteByte(frameRate);
m.WriteByte(life);
m.WriteByte(1); // "width" - has no effect
m.WriteByte(0); // "noise" - has no effect
m.WriteByte(c.r);
m.WriteByte(c.g);
m.WriteByte(c.b);
m.WriteByte(c.a);
m.WriteByte(scrollSpeed);
m.End();
}