-
Автор темы
- #1
C++:
Vector3 localViewAngle = *(Vector3*)(sdk::offsets::ClientBase + sdk::offsets::client_dll::dwViewAngles);
Distance = sqrt(pow(OppPos.x, 2) + pow(OppPos.y, 2));
yaw = atan2f(OppPos.y, OppPos.x) * 180 / M_PI - localViewAngle.y;
pitch = -atan(OppPos.z / Distance) * 180 / M_PI - localViewAngle.x;
if (Local.playerPawn.shotsFired > legitBot.rcs_bullet) {
Vector3 punchAngle;
if (Local.playerPawn.AimPunchCache.Count <= 0 && Local.playerPawn.AimPunchCache.Count > 0xFFFF)
return Vector3(pitch * float(1 - (legitBot.aimSmooth / 100.0f)) + localViewAngle.x, yaw * float(1 - (legitBot.aimSmooth / 100.0f)) + localViewAngle.y, 0.0f);
punchAngle = *(Vector3*)(Local.playerPawn.AimPunchCache.Data + (Local.playerPawn.AimPunchCache.Count - 1) * sizeof(Vector3));
yaw = yaw - punchAngle.y * legitBot.rcs_prc[0];
pitch = pitch - punchAngle.x * legitBot.rcs_prc[1];
Vector3 punchPos;
world_to_screen(vm.vm, localViewAngle + punchAngle, punchPos);
std::cout << punchPos.x << " " << punchPos.y << std::endl;
ImGui::GetBackgroundDrawList()->AddCircle(ImVec2(punchPos.x, punchPos.y), legitBot.aimFov, IM_COL32(255, 255, 255, 255), 30, 0.7f);
}
return Vector3(pitch * float(1 - (legitBot.aimSmooth / 100.0f)) + localViewAngle.x, yaw * float(1 - (legitBot.aimSmooth / 100.0f)) + localViewAngle.y, 0.0f);
Сейчас изучал оффсеты, нашел m_vecCsViewPunchAngle = 0x40; // QAngle
В CameraService, может он поможет?
Или вот еще вижу m_aimPunchAngleVel = 0x14D8; в PlayerPawn, рядом с самим m_aimPunchAngle = 0x14CC;
У кого есть какие идеи?