Skip to content

Commit

Permalink
Merge pull request #9 from 0xvpr/dev
Browse files Browse the repository at this point in the history
removed bingus code
  • Loading branch information
0xvpr authored Jun 25, 2023
2 parents f6979b9 + 6f0f7e5 commit fc46a85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ void hacks::KillTargetInCrosshair() {
auto entityList = *(EntityList **)(module_base_addr + offsets::entity);
auto cam = memory::FindDynamicAddress<Coords *>(module_base_addr + offsets::cam_xyz, offsets::cam_xyz_offsets);

if (!entityList || !cam) {
return;
}

if (IsInGame()) {
size_t n_entities = entityList->n_entities;
for (size_t i = 0; i < n_entities; ++i) {
Expand All @@ -203,7 +207,6 @@ void hacks::KillTargetInCrosshair() {
if (std::fabs(cam->x - ent->x) < 50.f && std::fabs(cam->y - ent->y) < 50.f) {
float force_vector_a[3] = { 0.f, 0.f, -1000.f };
float force_vector_b[3] = { 0.f, 0.f, 1000.f };
ent->vtable->setAnimation(ent, 0);
ent->vtable->DieByForce(ent, force_vector_a, force_vector_b, 100, 1);
}
}
Expand Down

0 comments on commit fc46a85

Please sign in to comment.