3 registered members (MadJack, AndrewAMD, Quad),
540
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
SOLVED: ent_decal crash
#448770
02/20/15 23:27
02/20/15 23:27
|
Joined: Jan 2005
Posts: 330 USA
MatAllum
OP
Senior Member
|
OP
Senior Member
Joined: Jan 2005
Posts: 330
USA
|
Can anyone fathom why the following code works in a test level:
result = c_trace(camera.x, temp, IGNORE_YOU|IGNORE_PASSABLE|SCAN_TEXTURE|USE_POLYGON);
you = hit.entity;
if(result > 0)
{
PARTICLE* p = ent_decal(you, bullethole, 10, random(360));
}
... and yet, when I put the code into practice, the game hard-crashes immediately upon bullet impact?
bullet_private_var = c_trace(gl_event_source,target_pos, IGNORE_ME|IGNORE_YOU|IGNORE_PASSABLE|IGNORE_PASSENTS|ACTIVATE_SHOOT|SCAN_TEXTURE);
you = hit.entity;
ENTITY* victim = you;
if(trace_hit)
{
PARTICLE* p = ent_decal(you, "bulhole.tga", 10, 0);
...
If anybody has ideas, I'd love to hear them. Incidentally, if I put a bullet hole on an object with a shader, the bullet hole is just a black square with a line down one side. How would I fix that?
|
|
|
Re: ent_decal crash
[Re: Superku]
#448772
02/21/15 00:52
02/21/15 00:52
|
Joined: Jan 2005
Posts: 330 USA
MatAllum
OP
Senior Member
|
OP
Senior Member
Joined: Jan 2005
Posts: 330
USA
|
Oh my goooooooddd: 1. Wow, I can't believe I missed that. 2. You're a genius, thank you.
No more crash, although now it tells me "file not found" with just a paragraph symbol, and the black square on shader problem is still present.
Last edited by MatAllum; 02/21/15 00:58.
|
|
|
|