Merge pull request #969 from LightPower392/extra

Fixed Bone ESP and More
This commit is contained in:
LightCat 2020-05-01 21:59:31 +02:00 committed by GitHub
commit eb8e7bbd1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 72 additions and 12 deletions

View File

@ -83,6 +83,7 @@
</LabeledObject> </LabeledObject>
<AutoVariable width="fill" target="aimbot.target.max-range" label="Max Range"/> <AutoVariable width="fill" target="aimbot.target.max-range" label="Max Range"/>
<AutoVariable width="fill" target="aimbot.multipoint" label="Multipoint"/> <AutoVariable width="fill" target="aimbot.multipoint" label="Multipoint"/>
<AutoVariable width="fill" target="aimbot.assistance.only" label="Assistance Only" tooltip="Aimbot is only active if your mouse has moved in the last half second."/>
<AutoVariable width="fill" target="aimbot.lock-target" label="Lock Target" tooltip="Lock onto a target until they die or leave your fov."/> <AutoVariable width="fill" target="aimbot.lock-target" label="Lock Target" tooltip="Lock onto a target until they die or leave your fov."/>
<AutoVariable width="fill" target="aimbot.target.ignore-non-rage" label="Rage Only"/> <AutoVariable width="fill" target="aimbot.target.ignore-non-rage" label="Rage Only"/>
<AutoVariable width="fill" target="aimbot.target.stickybomb" label="Aim at Stickybombs"/> <AutoVariable width="fill" target="aimbot.target.stickybomb" label="Aim at Stickybombs"/>
@ -124,7 +125,7 @@
</LabeledObject> </LabeledObject>
</List> </List>
</Box> </Box>
<Box padding="12 6 6 6" width="content" height="content" name="Sandvich Aimbot" x="170" y="240"> <Box padding="12 6 6 6" width="content" height="content" name="Sandvich Aimbot" x="170" y="255">
<List width="150"> <List width="150">
<AutoVariable width="fill" target="sandwichaim.enable" label="Enable Sandvich Aimbot"/> <AutoVariable width="fill" target="sandwichaim.enable" label="Enable Sandvich Aimbot"/>
<AutoVariable width="fill" target="sandwichaim.aimkey" label="Aimkey"/> <AutoVariable width="fill" target="sandwichaim.aimkey" label="Aimkey"/>

View File

@ -65,6 +65,7 @@
<AutoVariable width="fill" target="esp.box.building-3d" label="3D Buildings"/> <AutoVariable width="fill" target="esp.box.building-3d" label="3D Buildings"/>
<AutoVariable width="fill" target="esp.box.corner-size" label="Corner Size"/> <AutoVariable width="fill" target="esp.box.corner-size" label="Corner Size"/>
<AutoVariable width="fill" target="esp.bones" label="Bone ESP"/> <AutoVariable width="fill" target="esp.bones" label="Bone ESP"/>
<AutoVariable width="fill" target="esp.bones.color" label="Bone Color"/>
<AutoVariable width="fill" target="esp.sightlines" label="Sightlines"/> <AutoVariable width="fill" target="esp.sightlines" label="Sightlines"/>
<AutoVariable width="fill" target="esp.expand" label="Expand"/> <AutoVariable width="fill" target="esp.expand" label="Expand"/>
<LabeledObject width="fill" label="Text Position"> <LabeledObject width="fill" label="Text Position">

View File

@ -25,6 +25,7 @@
<AutoVariable width="fill" target="radar.show.ammo" label="Ammo Packs"/> <AutoVariable width="fill" target="radar.show.ammo" label="Ammo Packs"/>
<AutoVariable width="fill" target="radar.show.health" label="Health Packs"/> <AutoVariable width="fill" target="radar.show.health" label="Health Packs"/>
<AutoVariable width="fill" target="radar.show.teammates" label="Teammates"/> <AutoVariable width="fill" target="radar.show.teammates" label="Teammates"/>
<AutoVariable width="fill" target="radar.show.team.buildings" label="Team Buildings"/>
</List> </List>
</Box> </Box>
</Tab> </Tab>

View File

@ -40,6 +40,7 @@ static settings::Boolean wait_for_charge{ "aimbot.wait-for-charge", "0" };
static settings::Boolean silent{ "aimbot.silent", "1" }; static settings::Boolean silent{ "aimbot.silent", "1" };
static settings::Boolean target_lock{ "aimbot.lock-target", "0" }; static settings::Boolean target_lock{ "aimbot.lock-target", "0" };
static settings::Boolean assistance_only{ "aimbot.assistance.only", "0" };
static settings::Int hitbox{ "aimbot.hitbox", "0" }; static settings::Int hitbox{ "aimbot.hitbox", "0" };
static settings::Boolean zoomed_only{ "aimbot.zoomed-only", "1" }; static settings::Boolean zoomed_only{ "aimbot.zoomed-only", "1" };
static settings::Boolean only_can_shoot{ "aimbot.can-shoot-only", "1" }; static settings::Boolean only_can_shoot{ "aimbot.can-shoot-only", "1" };
@ -81,6 +82,12 @@ static settings::Boolean fov_draw{ "aimbot.fov-circle.enable", "0" };
static settings::Float fovcircle_opacity{ "aimbot.fov-circle.opacity", "0.7" }; static settings::Float fovcircle_opacity{ "aimbot.fov-circle.opacity", "0.7" };
#endif #endif
int PreviousX, PreviousY;
int CurrentX, CurrentY;
float last_mouse_check = 0;
float stop_moving_time = 0;
int GetSentry() int GetSentry()
{ {
for (int i = 1; i <= HIGHEST_ENTITY; i++) for (int i = 1; i <= HIGHEST_ENTITY; i++)
@ -325,6 +332,33 @@ static void CreateMove()
} }
} }
bool MouseMoving()
{
if ((g_GlobalVars->curtime - last_mouse_check) < 0.02)
{
auto previous = SDL_GetMouseState(&PreviousX, &PreviousY);
}
else
{
auto current = SDL_GetMouseState(&CurrentX, &CurrentY);
last_mouse_check = g_GlobalVars->curtime;
}
if (PreviousX != CurrentX || PreviousY != CurrentY)
{
stop_moving_time = g_GlobalVars->curtime + 0.5;
return true;
}
else if (g_GlobalVars->curtime <= stop_moving_time)
{
return true;
}
else
{
return false;
}
}
// The first check to see if the player should aim in the first place // The first check to see if the player should aim in the first place
bool ShouldAim() bool ShouldAim()
{ {
@ -356,6 +390,9 @@ bool ShouldAim()
return false; return false;
} }
if (assistance_only && !MouseMoving())
return false;
IF_GAME(IsTF2()) IF_GAME(IsTF2())
{ {
switch (GetWeaponMode()) switch (GetWeaponMode())

View File

@ -30,6 +30,7 @@ static settings::Int emoji_min_size{ "esp.emoji.min-size", "20" };
static settings::Int healthbar{ "esp.health-bar", "3" }; static settings::Int healthbar{ "esp.health-bar", "3" };
static settings::Boolean draw_bones{ "esp.bones", "false" }; static settings::Boolean draw_bones{ "esp.bones", "false" };
static settings::Boolean bones_color{ "esp.bones.color", "false" };
static settings::Int sightlines{ "esp.sightlines", "0" }; static settings::Int sightlines{ "esp.sightlines", "0" };
static settings::Int esp_text_position{ "esp.text-position", "0" }; static settings::Int esp_text_position{ "esp.text-position", "0" };
static settings::Int esp_expand{ "esp.expand", "0" }; static settings::Int esp_expand{ "esp.expand", "0" };
@ -150,7 +151,7 @@ struct bonelist_s
setup = true; setup = true;
} }
void DrawBoneList(const matrix3x4_t *bones, int *in, int size, const rgba_t &color, const Vector &displacement) void _FASTCALL DrawBoneList(const matrix3x4_t *bones, int *in, int size, const rgba_t &color)
{ {
Vector last_screen; Vector last_screen;
Vector current_screen; Vector current_screen;
@ -158,7 +159,6 @@ struct bonelist_s
{ {
const auto &bone = bones[in[i]]; const auto &bone = bones[in[i]];
Vector position(bone[0][3], bone[1][3], bone[2][3]); Vector position(bone[0][3], bone[1][3], bone[2][3]);
position += displacement;
if (!draw::WorldToScreen(position, current_screen)) if (!draw::WorldToScreen(position, current_screen))
{ {
return; return;
@ -171,7 +171,7 @@ struct bonelist_s
} }
} }
void Draw(CachedEntity *ent, const rgba_t &color) void _FASTCALL Draw(CachedEntity *ent, const rgba_t &color)
{ {
const model_t *model = RAW_ENT(ent)->GetModel(); const model_t *model = RAW_ENT(ent)->GetModel();
if (not model) if (not model)
@ -189,15 +189,14 @@ struct bonelist_s
return; return;
// ent->m_bBonesSetup = false; // ent->m_bBonesSetup = false;
Vector displacement = {};
const auto &bones = ent->hitboxes.GetBones(); const auto &bones = ent->hitboxes.GetBones();
DrawBoneList(bones, leg_r, 3, color, displacement); DrawBoneList(bones, leg_r, 3, color);
DrawBoneList(bones, leg_l, 3, color, displacement); DrawBoneList(bones, leg_l, 3, color);
DrawBoneList(bones, bottom, 3, color, displacement); DrawBoneList(bones, bottom, 3, color);
DrawBoneList(bones, spine, 7, color, displacement); DrawBoneList(bones, spine, 7, color);
DrawBoneList(bones, arm_r, 3, color, displacement); DrawBoneList(bones, arm_r, 3, color);
DrawBoneList(bones, arm_l, 3, color, displacement); DrawBoneList(bones, arm_l, 3, color);
DrawBoneList(bones, up, 3, color, displacement); DrawBoneList(bones, up, 3, color);
/*for (int i = 0; i < hdr->numbones; i++) { /*for (int i = 0; i < hdr->numbones; i++) {
const auto& bone = ent->GetBones()[i]; const auto& bone = ent->GetBones()[i];
Vector pos(bone[0][3], bone[1][3], bone[2][3]); Vector pos(bone[0][3], bone[1][3], bone[2][3]);
@ -626,6 +625,24 @@ void _FASTCALL ProcessEntityPT(CachedEntity *ent)
} }
} }
if (draw_bones)
{
if (vischeck && !ent->IsVisible())
transparent = true;
rgba_t bone_color = colors::EntityF(ent);
if (transparent)
bone_color = colors::Transparent(bone_color);
bonelist_s bl;
if (!CE_INVALID(ent) && ent->m_bAlivePlayer() && !RAW_ENT(ent)->IsDormant() && LOCAL_E->m_bAlivePlayer())
{
if (bones_color)
bl.Draw(ent, bone_color);
else
bl.Draw(ent, colors::white);
}
}
// Top horizontal health bar // Top horizontal health bar
if (*healthbar == 1) if (*healthbar == 1)
{ {

View File

@ -25,6 +25,7 @@ static settings::Int radar_x{ "radar.x", "100" };
static settings::Int radar_y{ "radar.y", "100" }; static settings::Int radar_y{ "radar.y", "100" };
static settings::Boolean use_icons{ "radar.use-icons", "true" }; static settings::Boolean use_icons{ "radar.use-icons", "true" };
static settings::Boolean show_teammates{ "radar.show.teammates", "true" }; static settings::Boolean show_teammates{ "radar.show.teammates", "true" };
static settings::Boolean show_teambuildings{ "radar.show.team.buildings", "true" };
static settings::Boolean show_healthpacks{ "radar.show.health", "true" }; static settings::Boolean show_healthpacks{ "radar.show.health", "true" };
static settings::Boolean show_ammopacks{ "radar.show.ammo", "true" }; static settings::Boolean show_ammopacks{ "radar.show.ammo", "true" };
@ -248,6 +249,8 @@ void Draw()
continue; continue;
if (!show_teammates && ent->m_Type() == ENTITY_PLAYER && !ent->m_bEnemy()) if (!show_teammates && ent->m_Type() == ENTITY_PLAYER && !ent->m_bEnemy())
continue; continue;
if (!show_teambuildings && ent->m_Type() == ENTITY_BUILDING && !ent->m_bEnemy())
continue;
if (ent->m_iClassID() == CL_CLASS(CObjectSentrygun)) if (ent->m_iClassID() == CL_CLASS(CObjectSentrygun))
sentries.push_back(ent); sentries.push_back(ent);
else if (!enemies_over_teammates || !show_teammates || ent->m_Type() != ENTITY_PLAYER) else if (!enemies_over_teammates || !show_teammates || ent->m_Type() != ENTITY_PLAYER)