tex_flag

Posted By: Bird

tex_flag - 04/23/06 19:05

i'm afraid i found a bug with c_trace and tex_flag:

i have a normal block with flag1 set on at each surface.
i scan the texture with this code:

Code:
result=c_trace(player.x, vector(player.x, player.y, player.z+300), ignore_models+ignore_sprites+scan_texture);
if(result>0)
{
beep;
str_cpy(debugstr, tex_name);
debug=1*tex_flag1+2*tex_flag2;
}



i can hear the 'beep' and i can see the name of the texture (Brickdark)
this code gets executed every frame, and if result<=0, debug and debugstr are resetted.
So i can say for sure that the texture gets scanned. But the debug-variable (debug=1*tex_flag1+2*tex_flag2;) is always 0.


- A6.40.2 pro
Posted By: jcl

Re: tex_flag - 04/25/06 20:40

Please update to the latest version (6.40).
Posted By: Bird

Re: tex_flag - 04/26/06 18:55

lol, didn't see that there is a new version..
but the same problem is still there. Nothing changed by updating.
Posted By: jcl

Re: tex_flag - 04/27/06 14:34

Ok, we'll look into the problem.
Posted By: Marco_Grubert

Re: tex_flag - 04/28/06 00:33

Quote:

i'm afraid i found a bug with c_trace and tex_flag:


Indeed you have.
Tex_Flag1..8 are not updated by SCAN_TEXTURE they way they should be. The next public beta will have that fixed.
Posted By: Bird

Re: tex_flag - 05/15/06 15:37

I just downloaded the new public beta, and I finally wanted to program the camera-system for which I need this feature. But now I see that this bug still isn't fixed!
Please fix it as soon as possible, so I can continue programming.
Posted By: jcl

Re: tex_flag - 05/16/06 07:03

Make sure that you've downloaded 6.40.5. Marco fixed it in 6.40.5, but not in 6.40.4. If the problem also happens in 6.40.5, it must have had a different reason. Can you provide a test level in that case?
Posted By: Bird

Re: tex_flag - 05/16/06 15:41

ok, I found out the reason:
I can't check the flags of an invisible block, tho i can get its texture's name.
So I just set the 'none'-flag at each texture, and it works (ofcourse it also works with visible blocks! But for my game i need invisible blocks )

thx alot!

regars
Posted By: tagimbul

Re: tex_flag - 02/09/16 13:44

hallo

i have a problem with tex_flag

i use
c_trace(vec1,vec2,IGNORE_ME|IGNORE_FLAG2| SCAN_TEXTURE);
and send the trace to a mdl model
the model have set(my,FLAG6)
but the tex_flag6 is allways == 0
by WED blocks with flag6 its works
why not by a mdl model?
Posted By: Superku

Re: tex_flag - 02/09/16 14:11

For models use the is(you,FLAG6) macro.
Posted By: tagimbul

Re: tex_flag - 02/09/16 14:51

ok a problem with it smirk

if i use in the player action, in a while loop
if (is(your,FLAG6))

its works only if the model with flag 6 downside of me
if i leave the platform the player script crash
Posted By: Superku

Re: tex_flag - 02/09/16 15:00

You have to check for a valid you pointer first:

c_trace(...)
if(you)
{
if(is(you,FLAG6)) tex_flag6 = 1;
}
if(tex_flag6) // now non-zero for model or block
Posted By: tagimbul

Re: tex_flag - 02/09/16 15:04

oh its great
thanks you superku grin
© 2024 lite-C Forums