diff --git a/Osiris/Hacks/Ragebot.cpp b/Osiris/Hacks/Ragebot.cpp index 7d1bbfa1..4f301b05 100644 --- a/Osiris/Hacks/Ragebot.cpp +++ b/Osiris/Hacks/Ragebot.cpp @@ -230,15 +230,15 @@ void Ragebot::run(UserCmd* cmd) noexcept for (const auto& target : enemies) { - const auto entity{ interfaces->entityList->getEntity(target.id) }; - const auto player = Animations::getPlayer(target.id); - const int minDamage = std::clamp(std::clamp(config->minDamageOverrideKey.isActive() ? cfg[weaponIndex].minDamageOverride : cfg[weaponIndex].minDamage, 0, target.health), 0, activeWeapon->getWeaponData()->damage); - - const auto& backupBoneCache = entity->getBoneCache().memory; - const auto& backupMins = entity->getCollideable()->obbMins(); - const auto& backupMaxs = entity->getCollideable()->obbMaxs(); - const auto& backupOrigin = entity->getAbsOrigin(); - const auto& backupAbsAngle = entity->getAbsAngle(); + auto entity{ interfaces->entityList->getEntity(target.id) }; + auto player = Animations::getPlayer(target.id); + int minDamage = std::clamp(std::clamp(config->minDamageOverrideKey.isActive() ? cfg[weaponIndex].minDamageOverride : cfg[weaponIndex].minDamage, 0, target.health), 0, activeWeapon->getWeaponData()->damage); + + matrix3x4* backupBoneCache = entity->getBoneCache().memory; + Vector backupMins = entity->getCollideable()->obbMins(); + Vector backupMaxs = entity->getCollideable()->obbMaxs(); + Vector backupOrigin = entity->getAbsOrigin(); + Vector backupAbsAngle = entity->getAbsAngle(); for (int cycle = 0; cycle < 2; cycle++) { diff --git a/Osiris/Hacks/Triggerbot.cpp b/Osiris/Hacks/Triggerbot.cpp index 84bd22a5..ef334ec2 100644 --- a/Osiris/Hacks/Triggerbot.cpp +++ b/Osiris/Hacks/Triggerbot.cpp @@ -103,15 +103,15 @@ void Triggerbot::run(UserCmd* cmd) noexcept || !entity->isOtherEnemy(localPlayer.get()) && !cfg.friendlyFire || entity->gunGameImmunity()) continue; - const auto player = Animations::getPlayer(i); + auto player = Animations::getPlayer(i); if (!player.gotMatrix) continue; - auto backupBoneCache = entity->getBoneCache().memory; - auto backupMins = entity->getCollideable()->obbMins(); - auto backupMaxs = entity->getCollideable()->obbMaxs(); - auto backupOrigin = entity->getAbsOrigin(); - auto backupAbsAngle = entity->getAbsAngle(); + matrix3x4* backupBoneCache = entity->getBoneCache().memory; + Vector backupMins = entity->getCollideable()->obbMins(); + Vector backupMaxs = entity->getCollideable()->obbMaxs(); + Vector backupOrigin = entity->getAbsOrigin(); + Vector backupAbsAngle = entity->getAbsAngle(); memcpy(entity->getBoneCache().memory, player.matrix.data(), std::clamp(entity->getBoneCache().size, 0, MAXSTUDIOBONES) * sizeof(matrix3x4)); memory->setAbsOrigin(entity, player.origin); @@ -177,7 +177,7 @@ void Triggerbot::run(UserCmd* cmd) noexcept if (!config->backtrack.enabled) continue; - const auto records = Animations::getBacktrackRecords(entity->index()); + auto records = Animations::getBacktrackRecords(entity->index()); if (!records || records->empty()) continue; @@ -190,7 +190,7 @@ void Triggerbot::run(UserCmd* cmd) noexcept continue; const auto angle = AimbotFunction::calculateRelativeAngle(startPos, records->at(i).origin, cmd->viewangles + aimPunch); - const auto fov = std::hypotf(angle.x, angle.y); + const auto fov = std::hypotf(angle.x, angle.y); if (fov < bestFov) { bestFov = fov; bestTick = i; @@ -200,7 +200,7 @@ void Triggerbot::run(UserCmd* cmd) noexcept if (bestTick <= -1) continue; - const auto record = records->at(bestTick); + auto record = records->at(bestTick); backupBoneCache = entity->getBoneCache().memory; backupMins = entity->getCollideable()->obbMins();