Модератор форума
-
Автор темы
- #1
C++:
void CResolver::Do(IBasePlayer* player) {
auto animstate = player->GetPlayerAnimState();
if (!animstate)
return;
animstate->m_flGoalFeetYaw = GetAngle(player);
if (!vars.ragebot.resolver)
return;
if (!csgo->local->isAlive())
return;
if (player->GetChokedPackets() <= 0)
return;
int idx = player->GetIndex();
if (player->GetPlayerInfo().fakeplayer)
return;
if (!(player->GetFlags() & FL_ONGROUND))
return;
float angle = GetAngle(player);
int new_side = 0;
bool forward = fabsf(Math::NormalizeYaw(GetAngle(player) - GetForwardYaw(player))) < 90.f;
if (csgo->missedshots[idx] == 0) {
ResolverMode[idx] = "C";
if (forward) {
FreestandSide[idx] *= -1;
ResolverMode[idx] += "B";
}
else
ResolverMode[idx] += "A";
animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f * FreestandSide[idx]);
}
else {
if (forward) {
switch (csgo->missedshots[idx] % 2) {
case 1:
ResolverMode[idx] = "Brute";
if (FreestandSide[idx] == 1)
animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f);
else
animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle + 58.f);
break;
case 0:
ResolverMode[idx] = "Brute";
if (FreestandSide[idx] == 1)
animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle + 58.f);
else
animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f);
break;
}
}
else {
switch (csgo->missedshots[idx] % 2) {
case 1:
ResolverMode[idx] = "Brute";
if (FreestandSide[idx] == 1)
animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle + 58.f);
else
animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f);
break;
case 0:
ResolverMode[idx] = "Brute";
if (FreestandSide[idx] == 1)
animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f);
else
animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle + 58.f);
break;
}
}
}
animstate->m_flGoalFeetYaw = Math::NormalizeYaw(animstate->m_flGoalFeetYaw);
}