Advertisement
tonti666

Untitled

Oct 8th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1.  
  2. OptionsSkeleton.SetFileId("opt_chams");
  3. OptionsSkeleton.AddItem("None");
  4. OptionsSkeleton.AddItem("Normal");
  5. OptionsSkeleton.AddItem("Visible Only");
  6. OptionsGroup.PlaceLabledControl("Skeleton", this, &OptionsSkeleton);
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14. if (Menu::Window.VisualsTab.OptionsSkeleton.GetIndex())
  15. DrawSkeleton(pEntity);
  16.  
  17.  
  18.  
  19. void CEsp::DrawSkeleton(IClientEntity* pEntity)
  20. {
  21. if (Menu::Window.VisualsTab.OptionsSkeleton.GetIndex() == 1)
  22. {
  23. studiohdr_t* pStudioHdr = Interfaces::ModelInfo->GetStudiomodel(pEntity->GetModel());
  24.  
  25. if (!pStudioHdr)
  26. return;
  27.  
  28. Vector vParent, vChild, sParent, sChild;
  29.  
  30. for (int j = 0; j < pStudioHdr->numbones; j++)
  31. {
  32. mstudiobone_t* pBone = pStudioHdr->GetBone(j);
  33.  
  34. if (pBone && (pBone->flags & BONE_USED_BY_HITBOX) && (pBone->parent != -1))
  35. {
  36. vChild = pEntity->GetBonePos(j);
  37. vParent = pEntity->GetBonePos(pBone->parent);
  38. if (Render::WorldToScreen(vParent, sParent) && Render::WorldToScreen(vChild, sChild))
  39. {
  40. Render::Line(sParent[0], sParent[1], sChild[0], sChild[1], Color(255, 255, 255, 255));
  41. }
  42. }
  43. }
  44. }
  45.  
  46. if (Menu::Window.VisualsTab.OptionsSkeleton.GetIndex() == 2)
  47. {
  48. typedef bool(__cdecl* GoesThroughSmoke)(Vector, Vector);
  49.  
  50. static uint32_t GoesThroughSmokeOffset = (uint32_t)Utilities::Memory::FindPatternV2("client.dll", "55 8B EC 83 EC 08 8B 15 ? ? ? ? 0F 57 C0");
  51. static GoesThroughSmoke GoesThroughSmokeFunction = (GoesThroughSmoke)GoesThroughSmokeOffset;
  52.  
  53. studiohdr_t* pStudioHdr = Interfaces::ModelInfo->GetStudiomodel(pEntity->GetModel());
  54.  
  55. if (!pStudioHdr)
  56. return;
  57.  
  58. Vector vParent, vChild, sParent, sChild;
  59.  
  60. for (int j = 0; j < pStudioHdr->numbones; j++)
  61. {
  62. mstudiobone_t* pBone = pStudioHdr->GetBone(j);
  63.  
  64. if (pBone && (pBone->flags & BONE_USED_BY_HITBOX) && (pBone->parent != -1))
  65. {
  66. vChild = pEntity->GetBonePos(j);
  67. vParent = pEntity->GetBonePos(pBone->parent);
  68. bool IsVis = GameUtils::IsVisible(hackManager.pLocal(), pEntity, (int)CSGOHitboxID::Head);
  69. if (GoesThroughSmokeFunction(hackManager.pLocal()->GetEyePosition(), pEntity->GetBonePos(8)))
  70.  
  71. return;
  72. if (IsVis)
  73. if (Render::WorldToScreen(vParent, sParent) && Render::WorldToScreen(vChild, sChild))
  74. {
  75. Render::Line(sParent[0], sParent[1], sChild[0], sChild[1], Color(255, 255, 255, 255));
  76. }
  77. }
  78. }
  79. }
  80.  
  81.  
  82. if (Menu::Window.VisualsTab.OptionsSkeleton.GetIndex() == 0)
  83. {
  84.  
  85. }
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement