Skip to content

TE_BSPDECAL

GeckoN edited this page Jan 31, 2017 · 4 revisions

Applies a decal to a world surface. Decals are referenced from the .bsp instead of decals.wad.

I've haven't been able to get this working - you can't load just any texture stored in the BSP. I guess it's possible g_EngineFuncs.DecalIndex() is not looking there.

Parameters

Type Name Description
Vector pos Center location of the decal. It needs to be witnin a few units of a surface.
string decal Decal name from the map .bsp

API Function

No API function exists as of SC 5.02

NetworkMessage Function

void te_bspdecal(Vector pos, string decal="{handi",
	NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
	NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
	m.WriteByte(TE_BSPDECAL);
	m.WriteCoord(pos.x);
	m.WriteCoord(pos.y);
	m.WriteCoord(pos.z);
	m.WriteByte(g_EngineFuncs.DecalIndex(decal));
	m.End();
}

Clone this wiki locally