Adding Eyes To Skeleton ESP.
Here's a code for adding eyes to your skeleton ESP.. Just add and compile and you're ready to go!
Maybe, add some lasers that blast from them when the enemy shoots or something? ;]
1 bug with it, for that engineer skin with the big glasses it draws big ass eyes, you might need to use another bone to get eye size.
SlagBlox~
Maybe, add some lasers that blast from them when the enemy shoots or something? ;]
Code:
bool cEngine::GetSeriesOfBoneVectors( fb::ClientSoldierEntity* pClientSoldier, int player_id, int pIDArray[], int count )
{
if( !count )
return false;
if( IsValid( pClientSoldier ) )
{
fb::ClientRagDollComponent* pRagdollComp = pClientSoldier->m_ragdollComponent;
if( IsValid( pRagdollComp ) )
{
fb::UpdatePoseResultData pPoseResultData = pRagdollComp->m_ragdollTransforms;
if( pPoseResultData.m_ValidTransforms == 1 )
{
fb::UpdatePoseResultData::QuatTransform* pQuatTransform = pPoseResultData.m_ActiveWorldTransforms;
if( IsValid( pQuatTransform ) )
{
for( int i = 0; i < count; i++ ) //get them all at once
{
int BoneID = pIDArray[i];
if( BoneID > 0 && BoneID < fb::UpdatePoseResultData::BONE_MAX )
pPlayerInfo[player_id].pBone.vBones[ BoneID ] = pQuatTransform[ BoneID ].m_TransAndScale;
}
return true;
}
}
}
}
return false;
}
void cEngine::DrawSeriesOfLines( CVector2i vPoints[], bool bDraws[], int count, int iPointIDS[], int ids_count, DWORD dwColor )//structsize of vPoints, bDraws arrays need to match!
{
if( !count)
return;
for( int i = 1; i < ids_count; i++ )
{
int ID = iPointIDS[i-1];
int prevID = iPointIDS[i];
if( ID < count && prevID < count )
{
if( bDraws[prevID] && bDraws[ID] )
m_pDxRenderer.DrawLine( vPoints[prevID].x, vPoints[prevID].y, vPoints[ID].x, vPoints[ID].y, dwColor );
}
}
}
void cEngine::DrawPlayerSkeleton( int iPlayerID, DWORD dwColor )
{
if( !IsValid( pPlayerInfo[iPlayerID].pClientSoldier ) )
return;
bool bDraw[23] = {0};
CVector2i vSkS[23];
int iSkeletonBones[23] = { 4, 6, 8, 9, 11, 15, 61, 63, 104, 109, 111, 115, 182, 183, 184, 185, 196, 197, 198, 199, 46, 96, NULL };//those are bone ID's
int iSkelArraySize = SizeOfArray( iSkeletonBones, int );
if( GetSeriesOfBoneVectors( pPlayerInfo[iPlayerID].pClientSoldier, iPlayerID, iSkeletonBones, iSkelArraySize ) )//bones where valid :)
{
//now w2s them all...
for( int i = 0; i < iSkelArraySize; i++ )
bDraw[i] = WorldToScreen( pPlayerInfo[iPlayerID].pBone.vBones[iSkeletonBones[i]], vSkS[i].x, vSkS[i].y );
int iSpine[] = { 0, 1, 2 };//Spine
int iR_Arm[] = { 2, 9, 10, 11 };//RightArm
int iL_Arm[] = { 2, 3, 4, 5 };//LeftArm
int iR_Foot[] = { 0, 16, 17, 18, 19 };//RightFoot
int iL_Foot[] = { 0, 12, 13, 14, 15 };//LeftFoot
float eye_r = (float)vSkS[21].Dist(vSkS[6]);
m_pDxRenderer.DrawCircle( vSkS[6].x, vSkS[6].y, eye_r, dwColor );//Eyes
m_pDxRenderer.DrawCircle( vSkS[7].x, vSkS[7].y, eye_r, dwColor );//Eyes
m_pDxRenderer.DrawCircle( vSkS[8].x, vSkS[8].y, (float)vSkS[8].Dist( vSkS[20] ), dwColor );//Head
DrawSeriesOfLines( vSkS, bDraw, iSkelArraySize, iSpine, SizeOfArray( iSpine, int ), dwColor );
DrawSeriesOfLines( vSkS, bDraw, iSkelArraySize, iR_Arm, SizeOfArray( iR_Arm, int ), dwColor );
DrawSeriesOfLines( vSkS, bDraw, iSkelArraySize, iL_Arm, SizeOfArray( iL_Arm, int ), dwColor );
DrawSeriesOfLines( vSkS, bDraw, iSkelArraySize, iR_Foot, SizeOfArray( iR_Foot, int ), dwColor );
DrawSeriesOfLines( vSkS, bDraw, iSkelArraySize, iL_Foot, SizeOfArray( iL_Foot, int ), dwColor );
}
}
SlagBlox~