- Статус
- Оффлайн
- Регистрация
- 26 Янв 2020
- Сообщения
- 378
- Реакции
- 157
Ну что то сделал, фиксит сука не плохо, прошу заметить, есть мемы, но да похуй. АХТУНГ!!! КОД ДЛЯ ПРИМЕРА, ОН НЕ СДЕЛАН ПОД КАКУЮ ТО КОНКРЕТНУЮ БАЗУ ДЛЯ РЕДИ ТУ ПЕЙСТ.
C++:
#include "../includes.h"
Resolver g_resolver{ };
int Resolver::GetChokedPackets(C_Player* entity)
{
auto ticks = game::TIME_TO_TICKS(entity->m_flSimulationTime() - entity->m_flOldSimulationTime());
if (ticks == 0 && last_ticks[entity->index()] > 0)
{
return last_ticks[entity->index()] - 1;
}
else
{
last_ticks[entity->index()] = ticks;
return ticks;
}
}
void Resolver::Run_Animations_resolve(C_Player* hyesos, AimPlayer* data, LagComp::LagRecord_t* record) {
if (!hyesos->alive())
return;
float duck_amt = hyesos->m_flDuckAmount();
auto speed = record->m_pEntity->m_vecVelocity().length_2d();
float sensitivity = 100.0f;
auto delta = math::normalize_difference(record->left_side, record->m_angEyeAngles.y);
bool negative_delta = delta < 0.0f;
if (negative_delta) {
std::swap(record->m_pMatrixLeft, record->m_pMatrixRight);
std::swap(record->left_side, record->right_side);
}
if (record->m_fFlags & FL_ONGROUND && hyesos->m_fFlags() & FL_ONGROUND) {
if (speed < 0.1f && std::abs(duck_amt - duck_amt) <= 0.0f)
{
auto delta = math::normalize_difference(record->m_pEntity->m_angEyeAngles().y, record->m_pState->m_flGoalFeetYaw);
auto result = record->m_pEntity->GetSequenceActivity(record->m_pLayers[3].m_sequence);
if (result == 979) {
if (record->m_pLayers[3].m_cycle != record->m_pLayers[3].m_cycle) {
if (record->m_pLayers[3].m_weight == 0.0f && record->m_pLayers[3].m_cycle == 0.0f)
{
data->m_extending = true;
animations_updated = true;
animations_index = (math::normalize_difference(record->m_pState->m_flEyeYaw, record->m_pState->m_flGoalFeetYaw) <= 0.0) - 1;
anims_pre_resolving = 0;
anim_time = g_csgo.m_globals->m_realtime;
reverse_index = animations_index * -1;
}
}
}
}
else if ((record->m_pLayers[12].m_weight < 0.01f || abs(record->m_pLayers[12].m_weight - record->m_pLayers[12].m_weight) < 0.01f) && record->m_pLayers[6].m_sequence == record->m_pLayers[6].m_sequence)
{
if (std::abs(record->m_pLayers[6].m_weight - record->m_pLayers[6].m_weight) < 0.01f)
{
float delta1 = abs(record->m_pLayers[6].m_playback_rate - record->moveLayers[0][6].m_playback_rate);
float delta2 = abs(record->m_pLayers[6].m_playback_rate - record->moveLayers[2][6].m_playback_rate);
float delta3 = abs(record->m_pLayers[6].m_playback_rate - record->moveLayers[1][6].m_playback_rate);
if (int(delta1 * sensitivity) < int(delta2 * sensitivity) || int(delta3 * sensitivity) <= int(delta2 * sensitivity) || int(delta2 * sensitivity))
{
if (int(delta1 * sensitivity) >= int(delta3 * sensitivity) && int(delta2 * sensitivity) > int(delta3 * sensitivity) && !int(delta3 * sensitivity))
{
data->m_extending = false;
record->animations_updated = true;
animations_index = 1;
anims_pre_resolving = 1;
anim_time = g_csgo.m_globals->m_realtime;
}
}
else
{
data->m_extending = false;
animations_updated = true;
animations_index = -1;
anims_pre_resolving = -1;
anim_time = g_csgo.m_globals->m_realtime;
}
}
}
}
}
std::deque<Shots> unapproved_shots;
void Resolver::Trace(C_Player* hyesos, AimPlayer* data, LagComp::LagRecord_t* record) {
if (!hyesos->alive())
return;
vec3_t current;
float back_two, right_two, left_two;
CGameTrace tr;
Ray ray, ray2, ray3;
CTraceFilter filter;
vec3_t right(hyesos->m_angEyeAngles().x, hyesos->m_angEyeAngles().y + hyesos->GetMaxBodyRotation(), hyesos->m_angEyeAngles().z);
vec3_t left(hyesos->m_angEyeAngles().x, hyesos->m_angEyeAngles().y - hyesos->GetMaxBodyRotation(), hyesos->m_angEyeAngles().z);
vec3_t back(hyesos->m_angEyeAngles().x, 180.f, hyesos->m_angEyeAngles().z);
current = vec3_t(hyesos->m_angEyeAngles().x, hyesos->m_angEyeAngles().y, hyesos->m_angEyeAngles().z);
filter.skip_entity = hyesos;
float distance = 384.0f;
float back_one, right_one, left_one;
right_one = current.y - right.y;
left_one = current.y - left.y;
back_one = current.y - back.y;
g_csgo.m_engine_trace->TraceRay(Ray(current, right), MASK_SHOT, &filter, &tr);
right_two = tr.m_endpos.length_2d() - tr.m_startpos.length_2d();
g_csgo.m_engine_trace->TraceRay(Ray(current, left), MASK_SHOT, &filter, &tr);
left_two = tr.m_endpos.length_2d() - tr.m_startpos.length_2d();
g_csgo.m_engine_trace->TraceRay(Ray(current, back), MASK_SHOT, &filter, &tr);
back_two = tr.m_endpos.length_2d() - tr.m_startpos.length_2d();
auto speed = record->m_pEntity->m_vecVelocity().length_2d();
float duck_amt = hyesos->m_flDuckAmount();
if (speed < 0.1f && std::abs(duck_amt - duck_amt) <= 0.0f)
{
auto result = record->m_pEntity->GetSequenceActivity(record->m_pLayers[3].m_sequence);
auto half_delta = hyesos->GetMaxBodyRotation() / 2;
if (result == 979) {
if (hyesos->m_AnimOverlay()[3].m_cycle == 0.f && hyesos->m_AnimOverlay()[3].m_weight == 0.f) {
if (record->m_pLayers[3].m_cycle != record->m_pLayers[3].m_cycle) {
data->m_extending = true;
if (fabs(right_one) >= half_delta)
side = 1;
else if (fabs(left_one) >= half_delta)
side = -1;
else if (fabs(back_one) >= half_delta)
side = 0;
}
}
}
}
else
{
data->m_extending = false;
if (fabs(right_two) >= distance)
side = 1;
else if (fabs(left_two) >= distance)
side = -1;
else if (fabs(back_two) >= distance)
side = 0;
}
trace_idex = side;
}
static float LBYADD[64];
static int ticks = 0;
void Resolver::Count_Data(AimPlayer* data, LagComp::LagRecord_t* record, C_Player* hyesos) {
if (!hyesos->alive())
return;
bool missed_to_anim = false;
int recursive = -1;
Trace(hyesos, data, record);
float zero = math::NormalizeYaw(hyesos->m_angEyeAngles().y);
auto idx = hyesos->index() - 1;
resolver_records* resolver_info = &g_resolver.inform[idx];
auto playerdamaged = g_aimbot.m_damage;
auto speed = record->m_pEntity->m_vecVelocity().length_2d();
Run_Animations_resolve(hyesos, data, record);
auto half_delta_t = math::NormalizeYaw(hyesos->GetMaxBodyRotation() / 2);
auto min_delta = hyesos->m_angEyeAngles().y - record->m_pState->m_flGoalFeetYaw;
if ((g_csgo.m_globals->m_realtime - anim_time <= 20.f && anims_pre_resolving >= 0) && (record->m_fFlags & FL_ONGROUND && hyesos->m_fFlags() & FL_ONGROUND) && !missed_to_anim) {
record->m_pState->m_flGoalFeetYaw = data->m_extending == false ? half_delta_t * animations_index : math::NormalizeYaw(hyesos->GetMaxBodyRotation()) * animations_index;
}
else {
if (trace_idex != 0)
reverse_index = trace_idex;
else
record->m_pState->m_flGoalFeetYaw = zero;
if ((hyesos == g_aimbot.m_target) && playerdamaged >= 1)
{
switch (data->m_missed_shots % 3)
{
case 1: LBYADD[idx] = half_delta_t;
break;
case 2: LBYADD[idx] = hyesos->GetMaxBodyRotation();
break;
case 3: LBYADD[idx] = 90.0f;
break;
default:
break;
}
}
record->m_pState->m_flGoalFeetYaw = reverse_index * LBYADD[idx];
if (LBYADD[idx] != 0.f && !g_cl.m_shot)
{
if (ticks <= GetTickCount64())
LBYADD[idx] = 0.f;
}
else
ticks = GetTickCount64() + 900;
}
if (data->m_missed_shots >= 1 && animations_updated)
missed_to_anim = true;
}
void Resolver::Angles_push(C_Player* player, LagCompensation::LagRecord_t* record) {
AimPlayer* data = &g_aimbot.m_players[player->index() - 1];
auto speed = player->m_vecVelocity().length_2d();
if (!record->m_pState)
return;
const auto info = g_anims.GetAnimationInfo(record->m_pEntity);
if (!info)
return;
if (game::IsFakePlayer(record->m_iEntIndex))
return;
Count_Data(data, record, player);
}
