I was trying to clean up this:

    trace_t tr;
    Vector vecDir;
    AngleVectors( p->EyeAngles(), &vecDir );
    Vector vecStart = p->EyePosition();
    Vector vecStop = vecStart + vecDir * MAX_TRACE_LENGTH;

    UTIL_TraceLine( vecStart, vecStop, MASK_SOLID, p, 
COLLISION_GROUP_NONE, &tr );
    if(!tr.m_pEnt || !tr.m_pEnt->IsPlayer())
    {
        return;
    }

This is part of  void HudTargetID::OnThink()  which basically shows a 
players name when you mouse over them.

However its tracing against player HULL, so you can see an 
enemy/friendly name pop up around corners and over objects, which is not 
the intended function of it.

I found you can switch the mask to MASK_SHOT and it uses the hitboxes 
instead, which works perfectly!

However, now the console is screaming at me about bone permissions.  I 
know its this trace because when I switch the filter to 
COLLISION_GROUP_PLAYER it stops giving the error in regards to weapon 
ents.  And when I revert it to what it is above, its gone.  I see the 
bool involved called IsBoneAccessAllowed() in c_baseanimating.cpp.  Does 
the animation system consider the other players hitboxes sacred?

So, what am I doing wrong here?  It works perfectly fine in game, and 
everything seems ok except for the error message whenever aimed at 
someone of either team with developer == 1.  Outside of that you'd never 
know the difference, but obviously something isn't happy and I'd like to 
correct it.  I'm somewhat new at this, so please excuse the noob-ness. ;-)

Thanks in advance!
-Mike

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to