*beta* Decal Material Problem

Posted By: Foxfire

*beta* Decal Material Problem - 08/03/08 20:13

hey,
I was trying out the new decal system (which is pretty nice, good job smile ) and/but I came across a really annoying problem which I cannot seem to be able to solve.
How can I change the particle material and other properties created by the ent_decal function? Nothing seems to work. The documentation says the following should work but it does not, the decal is created with a default material and properties. So far Ive come up with many attempts and this is my current:
sorry for poor formatting.



MATERIAL* bullet_hole_tex =
{
//relief mapping w/ self and projective shadows:
//modified to use 1 skin + target_map
effect="bullet_hole.fx";
flags = TANGENT;
}

BMAP* bullet_hole = "bullethole.bmp";

...(in main)...
while(1)
{
VECTOR trace_target;
vec_set(trace_target,vector(5000,0,0)); // the weapon has a firing range of 5000 quants
vec_rotate(trace_target, camera.pan);
vec_add(trace_target, camera.x);

//trace_target is a correct target location
c_trace(camera.x,trace_target, IGNORE_PASSABLE | USE_POLYGON| SCAN_TEXTURE | IGNORE_FLAG2);
if(hit)
{
//the statment works, creates decal
PARTICLE* dec = ent_decal(hit.entity,bullet_hole,100,random(360));//bulle_hole defined

dec.material = bullet_hole_tex;
//material is defined, also used ->
}

....
wait(1);
}//end while
}//end main
© 2023 lite-C Forums