I'm trying to setup a TE decal:
PHP Code:
ITempEntsSystem * tesystem = servertools->GetTempEntsSystem();
int decalid = engine->PrecacheDecal("materials/decals/redglowfade.vtf", true);
tesystem->Decal(filter, 0.0, &g_Trace.endpos, &g_Trace.startpos, 0, g_Trace.hitbox, decalid );
//engine->StaticDecal(g_Trace.endpos, decalid ,0,decalid ,true); //doesn't work too
But PrecacheDecal returns incorrect index. I get this:
I also tried to use different materials and PrecacheModel, but with no success
it seems that I should use
PHP Code:
IDecalEmitterSystem *decalsystem = NULL; // decals_subrect.txt
...
int index = decalsystem->GetDecalIndexForName( decalName );
how can I get the decalsystem pointer?