forked from baso88/SC_AngelScript
-
Notifications
You must be signed in to change notification settings - Fork 0
TE_DECAL
wootguy edited this page Nov 29, 2025
·
4 revisions
Applies a decal to a world or entity surface. Uses texture indexes 0 to 255.
| Type | Name | Description |
|---|---|---|
| Vector | pos | Center location of the decal. It needs to be witnin a few units of a surface. |
| CBaseEntity* | brushEnt | Brush entity to apply the decal to. If null, the decal is applied to the world instead. |
| const char* | decal | Texture name from decals.wad |
void te_decal(Vector pos, CBaseEntity* brushEnt=NULL, const char* decal="{handi",
int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
WRITE_BYTE(TE_DECAL);
WRITE_COORD(pos.x);
WRITE_COORD(pos.y);
WRITE_COORD(pos.z);
WRITE_BYTE(g_EngineFuncs.DecalIndex(decal));
WRITE_SHORT(brushEnt == NULL ? 0 : brushEnt->entindex());
MESSAGE_END();
}