static void Skeleton( CBaseEntity* pEntity )
{
CColor col = CColor( 255, 255, 255, 255 );
if( pEntity->GetTeam() == 2 )
col = CColor( 255, 255, 255, 255 );
if( Settings.GetSetting( Tab_Visuals, Visuals_Skeltal ) )
{
studiohdr_t* pStudioHdr = Interfaces.g_pModelInfo->GetStudioModel( pEntity->GetModel() );
if( !pStudioHdr )
return;
Vector vParent, vChild, sParent, sChild;
for( int j = 0; j < pStudioHdr->numbones; j++ )
{
mstudiobone_t* pBone = pStudioHdr->GetBone( j );
if( pBone && ( pBone->flags & BONE_USED_BY_HITBOX ) && ( pBone->parent != -1 ) )
{
vChild = pEntity->GetBonePos( j );
vParent = pEntity->GetBonePos( pBone->parent );
Interfaces.g_pDebugOverlay->ScreenPosition( vParent, sParent );
Interfaces.g_pDebugOverlay->ScreenPosition( vChild, sChild );
int red = 0;
int green = 0;
int blue = 0;
int alpha = 0;
col.GetColor( red, green, blue, alpha );
Interfaces.pSurface->DrawSetColor( red, green, blue, alpha );
Interfaces.pSurface->DrawLine( sParent[ 0 ], sParent[ 1 ], sChild[ 0 ], sChild[ 1 ] );
}
}
}
}