Difference between revisions of "TE MODEL"
Jump to navigation
Jump to search
Outerbeast (talk | contribs) (Created page with "Throws a rotating model with gravity, collisions, and sound effects. Models don't fade out. An API function exists:<br> <code>void CEntityFuncs::EjectBrass(const Vector& in v...") |
(No difference)
|
Latest revision as of 12:27, 16 April 2025
Throws a rotating model with gravity, collisions, and sound effects. Models don't fade out.
An API function exists:
void CEntityFuncs::EjectBrass(const Vector& in vecOrigin, const Vector& in vecVelocity, float flRotation, int iModel, TE_BOUNCE soundtype)
void te_model(Vector pos, Vector velocity, float yaw=0,
string model="models/agibs.mdl", uint8 bounceSound=2, uint8 life=32,
NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
m.WriteByte(TE_MODEL);
m.WriteCoord(pos.x);
m.WriteCoord(pos.y);
m.WriteCoord(pos.z);
m.WriteCoord(velocity.x);
m.WriteCoord(velocity.y);
m.WriteCoord(velocity.z);
m.WriteAngle(yaw);
m.WriteShort(g_EngineFuncs.ModelIndex(model));
m.WriteByte(bounceSound);
m.WriteByte(life);
m.End();
}
- Vector pos Sarting position for the effect
- Vector velocity Speed and direction of the model
- float yaw Initial yaw rotation of the model
- string model Model to display
- uint8 bounceSound Possible values:
0 : No Sound 1 : Bullet casing 2 : Shotgun shell
- uint8 life Time to display model (seconds * 0.1)
