|
|
|
@ -68,20 +68,35 @@ struct Matrix
|
|
|
|
|
float lastvis_esp[toRead];
|
|
|
|
|
float lastvis_aim[toRead];
|
|
|
|
|
|
|
|
|
|
int tmp_spec = 0, spectators = 0;
|
|
|
|
|
int tmp_all_spec = 0, allied_spectators = 0;
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
void ProcessPlayer(Entity& LPlayer, Entity& target, uint64_t entitylist, int index)
|
|
|
|
|
{
|
|
|
|
|
int entity_team = target.getTeamId();
|
|
|
|
|
|
|
|
|
|
if (!target.isAlive())
|
|
|
|
|
{
|
|
|
|
|
float localyaw = LPlayer.GetYaw();
|
|
|
|
|
float targetyaw = target.GetYaw();
|
|
|
|
|
|
|
|
|
|
if(localyaw==targetyaw)
|
|
|
|
|
{
|
|
|
|
|
if(LPlayer.getTeamId() == entity_team)
|
|
|
|
|
tmp_all_spec++;
|
|
|
|
|
else
|
|
|
|
|
tmp_spec++;
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Vector EntityPosition = target.getPosition();
|
|
|
|
|
Vector LocalPlayerPosition = LPlayer.getPosition();
|
|
|
|
|
float dist = LocalPlayerPosition.DistTo(EntityPosition);
|
|
|
|
|
if (dist > max_dist) return;
|
|
|
|
|
|
|
|
|
|
if (!target.isAlive())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if(!firing_range)
|
|
|
|
|
if (entity_team < 0 || entity_team>50 || entity_team == team_player) return;
|
|
|
|
|
|
|
|
|
@ -123,6 +138,8 @@ void DoActions()
|
|
|
|
|
{
|
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
|
|
|
|
bool tmp_thirdperson = false;
|
|
|
|
|
uint32_t counter = 0;
|
|
|
|
|
|
|
|
|
|
while (g_Base!=0 && c_Base!=0)
|
|
|
|
|
{
|
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(30));
|
|
|
|
@ -169,6 +186,8 @@ void DoActions()
|
|
|
|
|
|
|
|
|
|
max = 999.0f;
|
|
|
|
|
tmp_aimentity = 0;
|
|
|
|
|
tmp_spec = 0;
|
|
|
|
|
tmp_all_spec = 0;
|
|
|
|
|
if(firing_range)
|
|
|
|
|
{
|
|
|
|
|
int c=0;
|
|
|
|
@ -232,6 +251,23 @@ void DoActions()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!spectators && !allied_spectators)
|
|
|
|
|
{
|
|
|
|
|
spectators = tmp_spec;
|
|
|
|
|
allied_spectators = tmp_all_spec;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//refresh spectators count every ~2 seconds
|
|
|
|
|
counter++;
|
|
|
|
|
if(counter==70)
|
|
|
|
|
{
|
|
|
|
|
spectators = tmp_spec;
|
|
|
|
|
allied_spectators = tmp_all_spec;
|
|
|
|
|
counter = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!lock)
|
|
|
|
|
aimentity = tmp_aimentity;
|
|
|
|
|
else
|
|
|
|
@ -524,6 +560,10 @@ static void set_vars(uint64_t add_addr)
|
|
|
|
|
client_mem.Read<uint64_t>(add_addr + sizeof(uint64_t)*14, bone_addr);
|
|
|
|
|
uint64_t thirdperson_addr = 0;
|
|
|
|
|
client_mem.Read<uint64_t>(add_addr + sizeof(uint64_t)*15, thirdperson_addr);
|
|
|
|
|
uint64_t spectators_addr = 0;
|
|
|
|
|
client_mem.Read<uint64_t>(add_addr + sizeof(uint64_t)*16, spectators_addr);
|
|
|
|
|
uint64_t allied_spectators_addr = 0;
|
|
|
|
|
client_mem.Read<uint64_t>(add_addr + sizeof(uint64_t)*17, allied_spectators_addr);
|
|
|
|
|
|
|
|
|
|
uint32_t check = 0;
|
|
|
|
|
client_mem.Read<uint32_t>(check_addr, check);
|
|
|
|
@ -548,6 +588,8 @@ static void set_vars(uint64_t add_addr)
|
|
|
|
|
{
|
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
|
|
|
|
client_mem.Write<uint64_t>(g_Base_addr, g_Base);
|
|
|
|
|
client_mem.Write<int>(spectators_addr, spectators);
|
|
|
|
|
client_mem.Write<int>(allied_spectators_addr, allied_spectators);
|
|
|
|
|
|
|
|
|
|
client_mem.Read<int>(aim_addr, aim);
|
|
|
|
|
client_mem.Read<bool>(esp_addr, esp);
|
|
|
|
@ -648,7 +690,7 @@ int main(int argc, char *argv[])
|
|
|
|
|
//const char* ap_proc = "EasyAntiCheat_launcher.exe";
|
|
|
|
|
|
|
|
|
|
//Client "add" offset
|
|
|
|
|
uint64_t add_off = 0x3f870;
|
|
|
|
|
uint64_t add_off = 0x3f880;
|
|
|
|
|
|
|
|
|
|
std::thread aimbot_thr;
|
|
|
|
|
std::thread esp_thr;
|
|
|
|
|