Hi List,

This has been discussed before but I can't find any concrete advice to 
get TF2 style player collisions working fully (team mates can pass 
through each other, enemies are solid).

I've gotten as far as modifying PlayerSolidMask to:

unsigned int CGameMovement::PlayerSolidMask( bool brushOnly )
{
  unsigned int playerMask = MASK_PLAYERSOLID;
  if(player->GetTeamNumber() == 2)
    playerMask |= CONTENTS_TEAM1;
  else if(player->GetTeamNumber() == 3)
    playerMask |= CONTENTS_TEAM2;

    return ( brushOnly ) ? MASK_PLAYERSOLID_BRUSHONLY : playerMask;
}

And shouldCollide in baseentity to:

bool CBaseEntity::ShouldCollide( int collisionGroup, int contentsMask ) 
const
{
    if ( m_CollisionGroup == COLLISION_GROUP_DEBRIS )
    {
        if ( ! (contentsMask & CONTENTS_DEBRIS) )
            return false;
    }

  if(contentsMask & CONTENTS_TEAM1 && GetTeamNumber() == 2 || 
contentsMask & CONTENTS_TEAM2 && GetTeamNumber() == 3 )
    return false;

    return true;
}


And this seems to nearly do it, but theres still something stopping the 
player mid way through.

What else am I missing? Is it VPhysics related?
Thanks!

Rich

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

Reply via email to