-Made it rescale to fit character size.
You should no longer experience the bug where it doesn't fit properly, **EVEN** when crouched.
Enjoy.
Code:
__forceinline void RenderBoundingBox(LPDIRECT3DDEVICE9 D3DDevice, CFPlayer* Player, D3DCOLOR ESPColor) {
PlayerObject* ThisObject = (Player -> Object);
D3DXVECTOR3 Head = GetBonePosition(ThisObject, 6);
D3DXVECTOR3 FootMidpoint = D3DXVECTOR3(Head.x, GetBonePosition(ThisObject, 28).y, Head.z);
float HeightFactor = ((CalculateAbsoluteValue((Head - FootMidpoint).y) / 2) * 1.15);
D3DXVECTOR3 BaseDrawPoint = (GetMidpoint(Head, GetBonePosition(ThisObject, 3)) - D3DXVECTOR3(0, (HeightFactor / 2), 0));
D3DXVECTOR3 DrawPoint1 = (BaseDrawPoint + D3DXVECTOR3(-50, HeightFactor, -50));
D3DXVECTOR3 DrawPoint2 = (BaseDrawPoint + D3DXVECTOR3(-50, -HeightFactor, -50));
D3DXVECTOR3 DrawPoint3 = (BaseDrawPoint + D3DXVECTOR3(50, -HeightFactor, -50));
D3DXVECTOR3 DrawPoint4 = (BaseDrawPoint + D3DXVECTOR3(50, HeightFactor, -50));
D3DXVECTOR3 DrawPoint5 = (BaseDrawPoint + D3DXVECTOR3(-50, HeightFactor, 50));
D3DXVECTOR3 DrawPoint6 = (BaseDrawPoint + D3DXVECTOR3(-50, -HeightFactor, 50));
D3DXVECTOR3 DrawPoint7 = (BaseDrawPoint + D3DXVECTOR3(50, -HeightFactor, 50));
D3DXVECTOR3 DrawPoint8 = (BaseDrawPoint + D3DXVECTOR3(50, HeightFactor, 50));
if (WorldToScreen(D3DDevice, &DrawPoint1) && WorldToScreen(D3DDevice, &DrawPoint2) && WorldToScreen(D3DDevice, &DrawPoint3) && WorldToScreen(D3DDevice, &DrawPoint4) && WorldToScreen(D3DDevice, &DrawPoint5) && WorldToScreen(D3DDevice, &DrawPoint6) && WorldToScreen(D3DDevice, &DrawPoint7) && WorldToScreen(D3DDevice, &DrawPoint8)) {
DrawD3DLine(D3DDevice, DrawPoint1.x, DrawPoint1.y, DrawPoint2.x, DrawPoint2.y, ESPColor);
DrawD3DLine(D3DDevice, DrawPoint2.x, DrawPoint2.y, DrawPoint3.x, DrawPoint3.y, ESPColor);
DrawD3DLine(D3DDevice, DrawPoint3.x, DrawPoint3.y, DrawPoint4.x, DrawPoint4.y, ESPColor);
DrawD3DLine(D3DDevice, DrawPoint4.x, DrawPoint4.y, DrawPoint1.x, DrawPoint1.y, ESPColor);
DrawD3DLine(D3DDevice, DrawPoint5.x, DrawPoint5.y, DrawPoint6.x, DrawPoint6.y, ESPColor);
DrawD3DLine(D3DDevice, DrawPoint6.x, DrawPoint6.y, DrawPoint7.x, DrawPoint7.y, ESPColor);
DrawD3DLine(D3DDevice, DrawPoint7.x, DrawPoint7.y, DrawPoint8.x, DrawPoint8.y, ESPColor);
DrawD3DLine(D3DDevice, DrawPoint8.x, DrawPoint8.y, DrawPoint5.x, DrawPoint5.y, ESPColor);
DrawD3DLine(D3DDevice, DrawPoint1.x, DrawPoint1.y, DrawPoint5.x, DrawPoint5.y, ESPColor);
DrawD3DLine(D3DDevice, DrawPoint2.x, DrawPoint2.y, DrawPoint6.x, DrawPoint6.y, ESPColor);
DrawD3DLine(D3DDevice, DrawPoint3.x, DrawPoint3.y, DrawPoint7.x, DrawPoint7.y, ESPColor);
DrawD3DLine(D3DDevice, DrawPoint4.x, DrawPoint4.y, DrawPoint8.x, DrawPoint8.y, ESPColor);
};
};