> Why don't you use Client-side tracelines ?
> I use them for my TriApi rain and it works well.
> I do one and get the end position of each "poly". Then I make them go down
> until they reach the en position.
>
> And, it's worth asking :) why do I get a "Trace backup 0.0" message at the
> console sometimes ? It's really annoying :(
This is from the Quake I source code (from whence Half-Life came)...
while (SV_HullPointContents (hull, hull->firstclipnode, mid)
== CONTENTS_SOLID)
{ // shouldn't really happen, but does occasionally
frac -= 0.1;
if (frac < 0)
{
trace->fraction = midf;
VectorCopy (mid, trace->endpos);
Con_DPrintf ("backup past 0\n");
return false;
}
midf = p1f + (p2f - p1f)*frac;
for (i=0 ; i<3 ; i++)
mid[i] = p1[i] + frac*(p2[i] - p1[i]);
}
...basically if the trace ends inside something solid, it backs up a bit (0.1
units) and checks the point contents again to see if that's solid. It keeps
backing up from the end point until it hits non-solid space. Like the comment
says, it shouldn't really happen, but it does occasionally. (probably
something to do with floating point rounding errors). :)
Jeffrey "botman" Broome
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders