Just remember that TR_DidHit() will still return true if it hit world. Check what entity index is returned with TR_GetEntityIndex(trace); if it is returning 0 then it hit world, or a wall. If it returns anything other than -1 or 0, then it hit an entity.
Also, you can get the players mins/maxs with something like:
Code:
if (HasEntProp(client,Prop_Send,"m_vecMins")) GetEntPropVector(client,Prop_Send,"m_vecMins",vMins);
else if (HasEntProp(client,Prop_Data,"m_vecMins")) GetEntPropVector(client,Prop_Data,"m_vecMins",vMins);
if (HasEntProp(client,Prop_Send,"m_vecMaxs")) GetEntPropVector(client,Prop_Send,"m_vecMaxs",vMaxs);
else if (HasEntProp(client,Prop_Data,"m_vecMaxs")) GetEntPropVector(client,Prop_Data,"m_vecMaxs",vMaxs);
ScaleVector(vMins, 0.8);
ScaleVector(vMaxs, 0.8);
This will also account for different custom models if you use them, or ModelScale's. The HasEntProp for both Prop_Send and Prop_Data is for multi-game support, some games store player entity properties as Prop_Data, while most others store it as Prop_Send.
Edit: Also, you might want to change to MASK_SHOT because MASK_SOLID will also hit things like brushes and fences. The reason the mins/maxs should be scaled down a little is that it is by bounding box, so even if the edge of a player is by a wall, the trace will hit the wall because the edge of the trace hull did.