Since no one seems to have a clue I figured I would make a quick video showing the problem and maybe someone has an idea as to what I can do to fix it. I am starting to think it might by the precaching itself. I am using PrecacheModel() as thats what all of the decal plugins I could find use.
When I use PrecacheDecal() it ALWAYS creates a scout arm holding a scattergun. Im under the impression PrecacheDecal just doesnt work well in TF2. I have also tried PrecacheGeneric which makes the decal just not work at all so.... Heres the video.
http://www.youtube.com/watch?v=Xed_ojickzM
*Edit*
Also, I made a completely new plugin just to make sure I didnt screw up something small somewhere in my other one.
PHP Code:
#define DECAL_PATH "materials/decals/concrete/SHOT1_paint.vmt"
new DecalIndex;
public OnMapStart()
{
DecalIndex = PrecacheModel(DECAL_PATH, true);
}
public Action:OnWeaponFired(client, weapon, String:weaponname[])
{
new Float:pos[3];
GetCollisionPoint(client, pos);
if(IsDecalPrecached(DECAL_PATH))
PrintToChatAll("Its Precached");
TE_SetupGlowSprite(pos,DecalIndex,10.0,0.2,200);
TE_SendToAll();
}
stock GetCollisionPoint(client, Float:pos[3])
{
decl Float:vOrigin[3], Float:vAngles[3];
GetClientEyePosition(client, vOrigin);
GetClientEyeAngles(client, vAngles);
new Handle:trace = TR_TraceRayFilterEx(vOrigin, vAngles, MASK_SOLID, RayType_Infinite, TraceEntityFilterPlayer);
if(TR_DidHit(trace))
{
TR_GetEndPosition(pos, trace);
CloseHandle(trace);
return;
}
CloseHandle(trace);
}
public bool:TraceEntityFilterPlayer(entity, contentsMask)
{
return entity > MaxClients;
}
__________________