> Alright, I have a prop (model based) which has vphysics
> collision, it has it's own collisiongroup. I have another
> entity, a brush entity (like
> func_door) that moves, and again, has it's own collisiongroup.
>
> ShouldCollide has all the necessary checks and whatnot, but
> when debugging, I've found that shouldcollide is never being
> tested, yet the door collides with the prop, and gets
> stopped; however, it's blocked function doesn't even get called!

It's not clear from your message whether you are expecting the objects
to collide or not.  If not, then:
Which ShouldCollide()?  The one in src/dlls/physics.cpp:
CCollisionEvent::ShouldCollide() ?  That one should be getting called
constantly.  I would put a trap in that function right at the top.  Say
your two collision groups are group1 and group2:

int CCollisionEvent::ShouldCollide( IPhysicsObject *pObj0,
IPhysicsObject *pObj1, void *pGameData0, void *pGameData1 )
{
        CallbackContext check(this);

        CBaseEntity *pEntity0 = static_cast<CBaseEntity *>(pGameData0);
        CBaseEntity *pEntity1 = static_cast<CBaseEntity *>(pGameData1);

        if ( !pEntity0 || !pEntity1 )
                return 1;

        if ( (pEntity0->GetCollisionGroup() == group1 &&
pEntity1->GetCollisionGroup() == group2) ||
                (pEntity1->GetCollisionGroup() == group1 &&
pEntity0->GetCollisionGroup() == group2) )
        {
                Assert(0); // breaks here, now step through and see why
they are colliding.
        }

Otherwise, Blocked() is not called in every instance.  It's only called
by the game physics.  So depending on how each object moves it may not
get called.  What are the movetypes of the two objects?  Are they in any
hierarchies? There's not enough information here for me to answer
further.

Jay



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

Reply via email to