diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index ec7eca2..120f67a 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -1,36 +1,31 @@ name: MSBuild -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -env: - SOLUTION_FILE_PATH: . - - BUILD_PLATFORM: x64 - BUILD_CONFIGURATION: Release +on: [push, pull_request] jobs: - build: + msbuild: runs-on: windows-latest + strategy: + matrix: + configuration: [Release, ReleaseAVX2] + platform: [x64] + steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v1.1 + uses: microsoft/setup-msbuild@v2 - name: Restore NuGet packages - working-directory: ${{env.GITHUB_WORKSPACE}} - run: nuget restore ${{env.SOLUTION_FILE_PATH}} + working-directory: ${{ env.GITHUB_WORKSPACE }} + run: nuget restore - name: Build - working-directory: ${{env.GITHUB_WORKSPACE}} - run: msbuild /m /p:Platform=${{env.BUILD_PLATFORM}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} + working-directory: ${{ env.GITHUB_WORKSPACE }} + run: msbuild Amalgam.sln /p:Platform=${{ matrix.platform }} /p:Configuration=${{ matrix.configuration }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: Amalgam - path: ${{env.SOLUTION_FILE_PATH}}/output/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/*.dll \ No newline at end of file + name: Amalgam${{ matrix.platform }}${{ matrix.configuration }} + path: output/${{ matrix.platform }}/${{ matrix.configuration }}/*.dll \ No newline at end of file diff --git a/Amalgam.sln b/Amalgam.sln index 241a037..5a9be58 100644 --- a/Amalgam.sln +++ b/Amalgam.sln @@ -9,18 +9,30 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 + DebugAVX2|x64 = DebugAVX2|x64 + DebugAVX2|x86 = DebugAVX2|x86 Release|x64 = Release|x64 Release|x86 = Release|x86 + ReleaseAVX2|x64 = ReleaseAVX2|x64 + ReleaseAVX2|x86 = ReleaseAVX2|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2550C133-72A8-4AF7-B22A-A8012BD9F376}.Debug|x64.ActiveCfg = Debug|x64 {2550C133-72A8-4AF7-B22A-A8012BD9F376}.Debug|x64.Build.0 = Debug|x64 {2550C133-72A8-4AF7-B22A-A8012BD9F376}.Debug|x86.ActiveCfg = Debug|Win32 {2550C133-72A8-4AF7-B22A-A8012BD9F376}.Debug|x86.Build.0 = Debug|Win32 + {2550C133-72A8-4AF7-B22A-A8012BD9F376}.DebugAVX2|x64.ActiveCfg = DebugAVX2|x64 + {2550C133-72A8-4AF7-B22A-A8012BD9F376}.DebugAVX2|x64.Build.0 = DebugAVX2|x64 + {2550C133-72A8-4AF7-B22A-A8012BD9F376}.DebugAVX2|x86.ActiveCfg = DebugAVX2|Win32 + {2550C133-72A8-4AF7-B22A-A8012BD9F376}.DebugAVX2|x86.Build.0 = DebugAVX2|Win32 {2550C133-72A8-4AF7-B22A-A8012BD9F376}.Release|x64.ActiveCfg = Release|x64 {2550C133-72A8-4AF7-B22A-A8012BD9F376}.Release|x64.Build.0 = Release|x64 {2550C133-72A8-4AF7-B22A-A8012BD9F376}.Release|x86.ActiveCfg = Release|Win32 {2550C133-72A8-4AF7-B22A-A8012BD9F376}.Release|x86.Build.0 = Release|Win32 + {2550C133-72A8-4AF7-B22A-A8012BD9F376}.ReleaseAVX2|x64.ActiveCfg = ReleaseAVX2|x64 + {2550C133-72A8-4AF7-B22A-A8012BD9F376}.ReleaseAVX2|x64.Build.0 = ReleaseAVX2|x64 + {2550C133-72A8-4AF7-B22A-A8012BD9F376}.ReleaseAVX2|x86.ActiveCfg = ReleaseAVX2|Win32 + {2550C133-72A8-4AF7-B22A-A8012BD9F376}.ReleaseAVX2|x86.Build.0 = ReleaseAVX2|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Amalgam/Amalgam.vcxproj b/Amalgam/Amalgam.vcxproj index a42ff54..c3914a8 100644 --- a/Amalgam/Amalgam.vcxproj +++ b/Amalgam/Amalgam.vcxproj @@ -1,10 +1,26 @@  + + DebugAVX2 + Win32 + + + DebugAVX2 + x64 + Debug Win32 + + ReleaseAVX2 + Win32 + + + ReleaseAVX2 + x64 + Release Win32 @@ -33,6 +49,13 @@ MultiByte true + + DynamicLibrary + true + v143 + MultiByte + true + DynamicLibrary false @@ -40,6 +63,13 @@ true MultiByte + + DynamicLibrary + false + v143 + true + MultiByte + DynamicLibrary true @@ -47,6 +77,13 @@ MultiByte true + + DynamicLibrary + true + v143 + MultiByte + true + DynamicLibrary false @@ -54,6 +91,13 @@ true MultiByte + + DynamicLibrary + false + v143 + true + MultiByte + @@ -62,15 +106,27 @@ + + + + + + + + + + + + $(ProjectName)$(Platform)$(Configuration) @@ -78,12 +134,24 @@ $(ProjectDir)include\;$(IncludePath) $(SolutionDir)output\$(Platform)\$(Configuration)\ + + $(ProjectName)$(Platform)$(Configuration) + $(SolutionDir)build\$(Platform)\$(Configuration)\ + $(ProjectDir)include\;$(IncludePath) + $(SolutionDir)output\$(Platform)\$(Configuration)\ + $(ProjectDir)include\;$(IncludePath) $(SolutionDir)build\$(Platform)\$(Configuration)\ $(ProjectName)$(Platform)$(Configuration) $(SolutionDir)output\$(Platform)\$(Configuration)\ + + $(ProjectDir)include\;$(IncludePath) + $(SolutionDir)build\$(Platform)\$(Configuration)\ + $(ProjectName)$(Platform)$(Configuration) + $(SolutionDir)output\$(Platform)\$(Configuration)\ + $(SolutionDir)output\$(Platform)\$(Configuration)\ $(SolutionDir)build\$(Platform)\$(Configuration)\ @@ -94,6 +162,16 @@ $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) $(CommonExcludePath);$(VC_ExecutablePath_x64);$(VC_LibraryPath_x64) + + $(SolutionDir)output\$(Platform)\$(Configuration)\ + $(SolutionDir)build\$(Platform)\$(Configuration)\ + $(ProjectName)$(Platform)$(Configuration) + $(ProjectDir)include\;$(IncludePath) + $(VC_ExecutablePath_x64);$(CommonExecutablePath) + $(VC_ReferencesPath_x64); + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + $(CommonExcludePath);$(VC_ExecutablePath_x64);$(VC_LibraryPath_x64) + $(SolutionDir)output\$(Platform)\$(Configuration)\ $(SolutionDir)build\$(Platform)\$(Configuration)\ @@ -105,6 +183,17 @@ $(CommonExcludePath);$(VC_ExecutablePath_x64);$(VC_LibraryPath_x64) false + + $(SolutionDir)output\$(Platform)\$(Configuration)\ + $(SolutionDir)build\$(Platform)\$(Configuration)\ + $(ProjectName)$(Platform)$(Configuration) + $(ProjectDir)include\;$(IncludePath) + $(VC_ExecutablePath_x64);$(CommonExecutablePath) + $(VC_ReferencesPath_x64); + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + $(CommonExcludePath);$(VC_ExecutablePath_x64);$(VC_LibraryPath_x64) + false + Level3 @@ -119,7 +208,7 @@ true true true - AdvancedVectorExtensions2 + NotSet true ProgramDatabase @@ -131,6 +220,33 @@ true + + + Level3 + false + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + stdcpp20 + Default + true + MaxSpeed + Speed + true + true + true + AdvancedVectorExtensions2 + + + true + ProgramDatabase + MultiThreadedDebugDLL + true + + + Console + true + + Level3 @@ -143,7 +259,7 @@ true Speed true - AdvancedVectorExtensions2 + NotSet false ProgramDatabase @@ -155,7 +271,59 @@ true + + + Level3 + true + true + false + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + stdcpp20 + true + Speed + true + AdvancedVectorExtensions2 + + + false + ProgramDatabase + + + Console + true + true + true + + + + Level3 + false + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + stdcpp20 + true + Speed + + + true + MaxSpeed + true + Default + true + NotSet + true + ProgramDatabase + true + MultiThreadedDebugDLL + + + Console + true + + + Level3 false @@ -183,6 +351,31 @@ + + Level3 + true + true + false + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + stdcpp20 + true + Speed + + + true + NotSet + ProgramDatabase + false + + + Console + true + true + true + + + Level3 true diff --git a/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp b/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp index cda8289..a026e0e 100644 --- a/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp +++ b/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp @@ -220,7 +220,7 @@ std::unordered_map CAimbotProjectile::GetDirectPoints(Target_t& targe Vec3 vCenter, vBBoxMins, vBBoxMaxs; target.m_pEntity->As()->GetHitboxInfo(HITBOX_HEAD, &vCenter, &vBBoxMins, &vBBoxMaxs); Vec3 vOff = vCenter + (vBBoxMins + vBBoxMaxs) / 2 - target.m_pEntity->GetAbsOrigin(); - const float flHeight = vOff.z + (vMaxs.z - vOff.z) * (Vars::Aimbot::Projectile::HuntermanLerp.Value / 100.f); + const float flHeight = vOff.z + (vMaxs.z - vOff.z) * (Vars::Aimbot::Projectile::HuntsmanLerp.Value / 100.f); const float flMax = vMaxs.z - Vars::Aimbot::Projectile::VerticalShift.Value; mPoints[iPriority] = Vec3(vOff.x, vOff.y, std::min(flHeight, flMax)); } @@ -486,7 +486,7 @@ bool CAimbotProjectile::TestAngle(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, Tar } if (Vars::Aimbot::General::AimType.Value != 2) - projInfo.m_vHull += Vec3(Vars::Aimbot::Projectile::HullInc.Value, Vars::Aimbot::Projectile::HullInc.Value, Vars::Aimbot::Projectile::HullInc.Value); + projInfo.m_vHull += Vec3(Vars::Aimbot::Projectile::HullIncrease.Value, Vars::Aimbot::Projectile::HullIncrease.Value, Vars::Aimbot::Projectile::HullIncrease.Value); const Vec3 vOriginal = target.m_pEntity->GetAbsOrigin(); target.m_pEntity->SetAbsOrigin(target.m_vPos); @@ -644,7 +644,7 @@ int CAimbotProjectile::CanHit(Target_t& target, CTFPlayer* pLocal, CTFWeaponBase tInfo.iPrimeTime = TIME_TO_TICKS(PrimeTime(pWeapon)); } - const float flLatency = F::Backtrack.GetReal() + TICKS_TO_TIME(G::AnticipatedChoke - 1 + Vars::Aimbot::Projectile::LatOff.Value); + const float flLatency = F::Backtrack.GetReal() + TICKS_TO_TIME(G::AnticipatedChoke - 1 + Vars::Aimbot::Projectile::LatencyOffset.Value); const bool bCanSplash = Vars::Aimbot::Projectile::SplashPrediction.Value && tInfo.flRadius; const int iSplash = bCanSplash ? Vars::Aimbot::Projectile::SplashPrediction.Value : 0; diff --git a/Amalgam/src/Features/ImGui/Menu/Menu.cpp b/Amalgam/src/Features/ImGui/Menu/Menu.cpp index fe15e13..66b7b6c 100644 --- a/Amalgam/src/Features/ImGui/Menu/Menu.cpp +++ b/Amalgam/src/Features/ImGui/Menu/Menu.cpp @@ -196,12 +196,12 @@ void CMenu::MenuAimbot() { if (Section("debug## projectile")) { - FSlider("ground samples", Vars::Aimbot::Projectile::iGroundSamples, 3, 66, 1, "%d", FSlider_Left); - FSlider("air samples", Vars::Aimbot::Projectile::iAirSamples, 3, 66, 1, "%d", FSlider_Right); - FSlider("vert shift", Vars::Aimbot::Projectile::VerticalShift, 0.f, 20.f, 0.5f, "%.1f", FSlider_Left); - FSlider("hunterman lerp", Vars::Aimbot::Projectile::HuntermanLerp, 0.f, 100.f, 1.f, "%.0f%%", FSlider_Right); - FSlider("latency offset", Vars::Aimbot::Projectile::LatOff, -1.f, 1.f, 0.1f, "%.1f", FSlider_Left); - FSlider("hull inc", Vars::Aimbot::Projectile::HullInc, 0.f, 3.f, 0.5f, "%.1f", FSlider_Right); + FSlider("ground samples", Vars::Aimbot::Projectile::GroundSamples, 3, 66, 1, "%d", FSlider_Left); + FSlider("air samples", Vars::Aimbot::Projectile::AirSamples, 3, 66, 1, "%d", FSlider_Right); + FSlider("vertical shift", Vars::Aimbot::Projectile::VerticalShift, 0.f, 20.f, 0.5f, "%.1f", FSlider_Left); + FSlider("huntsman lerp", Vars::Aimbot::Projectile::HuntsmanLerp, 0.f, 100.f, 1.f, "%.0f%%", FSlider_Right); + FSlider("latency offset", Vars::Aimbot::Projectile::LatencyOffset, -1.f, 1.f, 0.1f, "%.1f", FSlider_Left); + FSlider("hull increase", Vars::Aimbot::Projectile::HullIncrease, 0.f, 3.f, 0.5f, "%.1f", FSlider_Right); FSlider("drag override", Vars::Aimbot::Projectile::DragOverride, 0.f, 1.f, 0.001f, "%.3f", FSlider_Left); FSlider("time override", Vars::Aimbot::Projectile::TimeOverride, 0.f, 1.f, 0.001f, "%.3f", FSlider_Right); FSlider("splash points", Vars::Aimbot::Projectile::SplashPoints, 0, 100, 1, "%d", FSlider_Left); @@ -330,7 +330,7 @@ void CMenu::MenuVisuals() TableNextColumn(); if (Section("ESP")) { - FDropdown("Draw", Vars::ESP::Draw, { "Enemy", "Team", "Friends", "Local", "NPCs", "Health", "Ammo", "Money", "Bombs", "Spellbook", "Gargoyle" }, {}, FDropdown_Multi); + FDropdown("Draw", Vars::ESP::Draw, { "Enemy", "Team", "Local", "Friends", "Priority", "NPCs", "Health", "Ammo", "Money", "Bombs", "Spellbook", "Gargoyle" }, {}, FDropdown_Multi); FDropdown("Player", Vars::ESP::Player, { "Name", "Health bar", "Health text", "Uber bar", "Uber text", "Class icon", "Class text", "Weapon icon", "Weapon text", "Distance", "Box", "Bones", "Priority", "Labels", "Buffs", "Debuffs", "Misc", "Lag compensation", "Ping", "KDR" }, {}, FDropdown_Multi); FDropdown("Building", Vars::ESP::Building, { "Name", "Health bar", "Health text", "Distance", "Box", "Owner", "Level", "Conditions" }, {}, FDropdown_Multi); } EndSection(); @@ -425,6 +425,7 @@ void CMenu::MenuVisuals() { FToggle("Local", Vars::Chams::Player::Local); FToggle("Friend", Vars::Chams::Player::Friend, FToggle_Middle); + FToggle("Priority", Vars::Chams::Player::Priority); FMDropdown("Visible material", Vars::Chams::Player::VisibleMaterial, FDropdown_Left, 1); FColorPicker("Visible color", Vars::Chams::Player::VisibleColor, 0, FColorPicker_Dropdown); @@ -520,6 +521,7 @@ void CMenu::MenuVisuals() { FToggle("Local", Vars::Glow::Player::Local); FToggle("Friend", Vars::Glow::Player::Friend, FToggle_Middle); + FToggle("Priority", Vars::Glow::Player::Priority); Dummy({ 0, 8 }); FToggle("Stencil", Vars::Glow::Player::Stencil); @@ -760,7 +762,7 @@ void CMenu::MenuVisuals() { FToggle("Enabled", Vars::Radar::Players::Enabled); FToggle("Background", Vars::Radar::Players::Background, FToggle_Middle); - FDropdown("Draw", Vars::Radar::Players::Draw, { "Local", "Enemy", "Team", "Friends", "Cloaked" }, {}, FDropdown_Multi | FDropdown_Left); + FDropdown("Draw", Vars::Radar::Players::Draw, { "Local", "Enemy", "Team", "Friends", "Priority", "Cloaked" }, {}, FDropdown_Multi | FDropdown_Left); FDropdown("Icon", Vars::Radar::Players::IconType, { "Icons", "Portraits", "Avatar" }, {}, FDropdown_Right); FSlider("Icon size## Player", Vars::Radar::Players::IconSize, 12, 30, 2); FToggle("Health bar", Vars::Radar::Players::Health); @@ -773,7 +775,7 @@ void CMenu::MenuVisuals() { FToggle("Enabled", Vars::Radar::Buildings::Enabled); FToggle("Background", Vars::Radar::Buildings::Background, FToggle_Middle); - FDropdown("Draw", Vars::Radar::Buildings::Draw, { "Local", "Enemy", "Team", "Friends" }, {}, FDropdown_Multi); + FDropdown("Draw", Vars::Radar::Buildings::Draw, { "Local", "Enemy", "Team", "Friends", "Priority" }, {}, FDropdown_Multi); FSlider("Icon size## Building", Vars::Radar::Buildings::IconSize, 12, 30, 2); FToggle("Health bar", Vars::Radar::Buildings::Health); } EndSection(); diff --git a/Amalgam/src/Features/Players/PlayerUtils.cpp b/Amalgam/src/Features/Players/PlayerUtils.cpp index 23018b2..7c2268a 100644 --- a/Amalgam/src/Features/Players/PlayerUtils.cpp +++ b/Amalgam/src/Features/Players/PlayerUtils.cpp @@ -111,8 +111,11 @@ bool CPlayerlistUtils::HasTag(int iIndex, std::string sTag) -int CPlayerlistUtils::GetPriority(uint32_t friendsID) +int CPlayerlistUtils::GetPriority(uint32_t friendsID, bool bCache) { + if (bCache) + return H::Entities.GetPriority(friendsID); + const int iDefault = mTags["Default"].Priority; if (!friendsID) return iDefault; @@ -141,8 +144,11 @@ int CPlayerlistUtils::GetPriority(uint32_t friendsID) } return iDefault; } -int CPlayerlistUtils::GetPriority(int iIndex) +int CPlayerlistUtils::GetPriority(int iIndex, bool bCache) { + if (bCache) + return H::Entities.GetPriority(iIndex); + if (const uint32_t friendsID = GetFriendsID(iIndex)) return GetPriority(friendsID); return mTags["Default"].Priority; diff --git a/Amalgam/src/Features/Players/PlayerUtils.h b/Amalgam/src/Features/Players/PlayerUtils.h index 30a719a..b7871c0 100644 --- a/Amalgam/src/Features/Players/PlayerUtils.h +++ b/Amalgam/src/Features/Players/PlayerUtils.h @@ -39,8 +39,8 @@ public: bool HasTag(uint32_t friendsID, std::string sTag); bool HasTag(int iIndex, std::string sTag); - int GetPriority(uint32_t friendsID); - int GetPriority(int iIndex); + int GetPriority(uint32_t friendsID, bool bCache = true); + int GetPriority(int iIndex, bool bCache = true); bool GetSignificantTag(uint32_t friendsID, std::string* sTag, PriorityLabel_t* plTag, int iMode = 1); // iMode: 0 - Priorities & Labels, 1 - Priorities, 2 - Labels bool GetSignificantTag(int iIndex, std::string* sTag, PriorityLabel_t* plTag, int iMode = 1); // iMode: 0 - Priorities & Labels, 1 - Priorities, 2 - Labels bool IsIgnored(uint32_t friendsID); diff --git a/Amalgam/src/Features/Simulation/MovementSimulation/MovementSimulation.cpp b/Amalgam/src/Features/Simulation/MovementSimulation/MovementSimulation.cpp index 987d735..a762d46 100644 --- a/Amalgam/src/Features/Simulation/MovementSimulation/MovementSimulation.cpp +++ b/Amalgam/src/Features/Simulation/MovementSimulation/MovementSimulation.cpp @@ -199,7 +199,7 @@ bool CMovementSimulation::Initialize(CBaseEntity* pEntity, PlayerStorage& player return false; } - const int iStrafeSamples = pPlayer->OnSolid() ? Vars::Aimbot::Projectile::iGroundSamples.Value : Vars::Aimbot::Projectile::iAirSamples.Value; + const int iStrafeSamples = pPlayer->OnSolid() ? Vars::Aimbot::Projectile::GroundSamples.Value : Vars::Aimbot::Projectile::AirSamples.Value; // calculate strafe if desired bool bCalculated = cancelStrafe ? false : StrafePrediction(playerStorageOut, iStrafeSamples); diff --git a/Amalgam/src/Features/TickHandler/TickHandler.cpp b/Amalgam/src/Features/TickHandler/TickHandler.cpp index 840d491..1ff610f 100644 --- a/Amalgam/src/Features/TickHandler/TickHandler.cpp +++ b/Amalgam/src/Features/TickHandler/TickHandler.cpp @@ -68,7 +68,7 @@ int CTickshiftHandler::GetTicks(CTFPlayer* pLocal) if (G::DoubleTap && G::ShiftedGoal < G::ShiftedTicks) return G::ShiftedTicks - G::ShiftedGoal; - if (!!Vars::CL_Move::Doubletap::Doubletap.Value + if (!Vars::CL_Move::Doubletap::Doubletap.Value || G::ShiftedTicks < std::min(Vars::CL_Move::Doubletap::TickLimit.Value - 1, G::MaxShift) || G::WaitForShift || G::Warp || G::Recharge || bSpeedhack || F::AutoRocketJump.iFrame != -1) return 0; diff --git a/Amalgam/src/Features/Visuals/Chams/Chams.cpp b/Amalgam/src/Features/Visuals/Chams/Chams.cpp index 7742500..dd6c02d 100644 --- a/Amalgam/src/Features/Visuals/Chams/Chams.cpp +++ b/Amalgam/src/Features/Visuals/Chams/Chams.cpp @@ -3,6 +3,7 @@ #include "../Materials/Materials.h" #include "../FakeAngle/FakeAngle.h" #include "../../Backtrack/Backtrack.h" +#include "../../Players/PlayerUtils.h" Chams_t CChams::GetStruct(std::vector VisibleMaterial, std::vector OccludedMaterial, Color_t VisibleColor, Color_t OccludedColor) { @@ -16,12 +17,9 @@ Chams_t CChams::GetStruct(std::vector VisibleMaterial, std::vector< bool CChams::GetPlayerChams(CTFPlayer* pEntity, CTFPlayer* pLocal, Chams_t* pChams, bool bFriendly, bool bEnemy) { - if (Vars::Chams::Player::Local.Value && pEntity == pLocal) - { - *pChams = GetStruct(Vars::Chams::Player::VisibleMaterial.Value, Vars::Chams::Player::OccludedMaterial.Value, Vars::Chams::Player::VisibleColor.Value, Vars::Chams::Player::OccludedColor.Value); - return true; - } - else if (Vars::Chams::Player::Friend.Value && H::Entities.IsFriend(pEntity->entindex())) + if (Vars::Chams::Player::Local.Value && pEntity == pLocal + || Vars::Chams::Player::Friend.Value && H::Entities.IsFriend(pEntity->entindex()) + || Vars::Chams::Player::Priority.Value && F::PlayerUtils.GetPriority(pEntity->entindex()) > F::PlayerUtils.mTags["Default"].Priority) { *pChams = GetStruct(Vars::Chams::Player::VisibleMaterial.Value, Vars::Chams::Player::OccludedMaterial.Value, Vars::Chams::Player::VisibleColor.Value, Vars::Chams::Player::OccludedColor.Value); return true; diff --git a/Amalgam/src/Features/Visuals/ESP/ESP.cpp b/Amalgam/src/Features/Visuals/ESP/ESP.cpp index afe4f0a..6d13e37 100644 --- a/Amalgam/src/Features/Visuals/ESP/ESP.cpp +++ b/Amalgam/src/Features/Visuals/ESP/ESP.cpp @@ -60,19 +60,14 @@ void CESP::DrawPlayers(CTFPlayer* pLocal) if (pPlayer->IsDormant()) { - if (!Vars::ESP::DormantAlpha.Value) + if (!Vars::ESP::DormantAlpha.Value || Vars::ESP::DormantPriority.Value && F::PlayerUtils.GetPriority(nIndex) <= F::PlayerUtils.mTags["Default"].Priority) continue; - if (Vars::ESP::DormantPriority.Value) - { - PlayerInfo_t pi{}; - if (I::EngineClient->GetPlayerInfo(nIndex, &pi) && F::PlayerUtils.GetPriority(pi.friendsID) <= F::PlayerUtils.mTags["Default"].Priority) - continue; - } } if (nIndex != I::EngineClient->GetLocalPlayer()) { - if (!(Vars::ESP::Draw.Value & 1 << 2 && H::Entities.IsFriend(nIndex))) + if (!(Vars::ESP::Draw.Value & 1 << 3 && H::Entities.IsFriend(nIndex)) + && !(Vars::ESP::Draw.Value & 1 << 4 && F::PlayerUtils.GetPriority(nIndex) > F::PlayerUtils.mTags["Default"].Priority)) { if (!(Vars::ESP::Draw.Value & 1 << 0) && pPlayer->m_iTeamNum() != pLocal->m_iTeamNum()) continue; @@ -80,7 +75,7 @@ void CESP::DrawPlayers(CTFPlayer* pLocal) continue; } } - else if (!(Vars::ESP::Draw.Value & 1 << 3) || !I::Input->CAM_IsThirdPerson()) + else if (!(Vars::ESP::Draw.Value & 1 << 2) || !I::Input->CAM_IsThirdPerson()) continue; I::MatSystemSurface->DrawSetAlphaMultiplier((pPlayer->IsDormant() ? Vars::ESP::DormantAlpha.Value : Vars::ESP::ActiveAlpha.Value) / 255.f); @@ -476,7 +471,8 @@ void CESP::DrawBuildings(CTFPlayer* pLocal) int nIndex = pOwner->entindex(); if (nIndex != I::EngineClient->GetLocalPlayer()) { - if (!(Vars::ESP::Draw.Value & 1 << 2 && H::Entities.IsFriend(nIndex))) + if (!(Vars::ESP::Draw.Value & 1 << 3 && H::Entities.IsFriend(nIndex)) + && !(Vars::ESP::Draw.Value & 1 << 4 && F::PlayerUtils.GetPriority(nIndex) > F::PlayerUtils.mTags["Default"].Priority)) { if (!(Vars::ESP::Draw.Value & 1 << 0) && pOwner->m_iTeamNum() != pLocal->m_iTeamNum()) continue; @@ -484,7 +480,7 @@ void CESP::DrawBuildings(CTFPlayer* pLocal) continue; } } - else if (!(Vars::ESP::Draw.Value & 1 << 3)) + else if (!(Vars::ESP::Draw.Value & 1 << 2)) continue; } else @@ -632,7 +628,7 @@ void CESP::DrawWorld() I::MatSystemSurface->DrawSetAlphaMultiplier(Vars::ESP::ActiveAlpha.Value); - if (Vars::ESP::Draw.Value & 1 << 4) + if (Vars::ESP::Draw.Value & 1 << 5) { for (auto NPC : H::Entities.GetGroup(EGroupType::WORLD_NPC)) { @@ -661,7 +657,7 @@ void CESP::DrawWorld() } } - if (Vars::ESP::Draw.Value & 1 << 5) + if (Vars::ESP::Draw.Value & 1 << 6) { for (auto pHealth : H::Entities.GetGroup(EGroupType::WORLD_HEALTH)) { @@ -671,7 +667,7 @@ void CESP::DrawWorld() } } - if (Vars::ESP::Draw.Value & 1 << 6) + if (Vars::ESP::Draw.Value & 1 << 7) { for (auto pAmmo : H::Entities.GetGroup(EGroupType::WORLD_AMMO)) { @@ -681,7 +677,7 @@ void CESP::DrawWorld() } } - if (Vars::ESP::Draw.Value & 1 << 7) + if (Vars::ESP::Draw.Value & 1 << 8) { for (auto pCash : H::Entities.GetGroup(EGroupType::WORLD_MONEY)) { @@ -693,7 +689,7 @@ void CESP::DrawWorld() } } - if (Vars::ESP::Draw.Value & 1 << 8) + if (Vars::ESP::Draw.Value & 1 << 9) { for (auto pBomb : H::Entities.GetGroup(EGroupType::WORLD_BOMBS)) { @@ -716,7 +712,7 @@ void CESP::DrawWorld() } } - if (Vars::ESP::Draw.Value & 1 << 9) + if (Vars::ESP::Draw.Value & 1 << 10) { for (auto pBook : H::Entities.GetGroup(EGroupType::WORLD_SPELLBOOK)) { @@ -728,7 +724,7 @@ void CESP::DrawWorld() } } - if (Vars::ESP::Draw.Value & 1 << 10) + if (Vars::ESP::Draw.Value & 1 << 11) { for (auto pGargy : H::Entities.GetGroup(EGroupType::WORLD_GARGOYLE)) { diff --git a/Amalgam/src/Features/Visuals/Glow/Glow.cpp b/Amalgam/src/Features/Visuals/Glow/Glow.cpp index 3d59506..20c7135 100644 --- a/Amalgam/src/Features/Visuals/Glow/Glow.cpp +++ b/Amalgam/src/Features/Visuals/Glow/Glow.cpp @@ -3,6 +3,7 @@ #include "../Materials/Materials.h" #include "../FakeAngle/FakeAngle.h" #include "../../Backtrack/Backtrack.h" +#include "../../Players/PlayerUtils.h" Glow_t CGlow::GetStruct(bool Stencil, bool Blur, int StencilScale, int BlurScale) { @@ -16,13 +17,9 @@ Glow_t CGlow::GetStruct(bool Stencil, bool Blur, int StencilScale, int BlurScale bool CGlow::GetPlayerGlow(CTFPlayer* pEntity, CTFPlayer* pLocal, Glow_t* pGlow, Color_t* pColor, bool bFriendly, bool bEnemy) { - if (Vars::Glow::Player::Local.Value && pEntity == pLocal) - { - *pGlow = GetStruct(Vars::Glow::Player::Stencil.Value, Vars::Glow::Player::Blur.Value, Vars::Glow::Player::StencilScale.Value, Vars::Glow::Player::BlurScale.Value); - *pColor = H::Color.GetEntityDrawColor(pLocal, pEntity, Vars::Colors::Relative.Value); - return true; - } - else if (Vars::Glow::Player::Friend.Value && H::Entities.IsFriend(pEntity->entindex())) + if (Vars::Glow::Player::Local.Value && pEntity == pLocal + || Vars::Glow::Player::Friend.Value && H::Entities.IsFriend(pEntity->entindex()) + || Vars::Glow::Player::Priority.Value && F::PlayerUtils.GetPriority(pEntity->entindex()) > F::PlayerUtils.mTags["Default"].Priority) { *pGlow = GetStruct(Vars::Glow::Player::Stencil.Value, Vars::Glow::Player::Blur.Value, Vars::Glow::Player::StencilScale.Value, Vars::Glow::Player::BlurScale.Value); *pColor = H::Color.GetEntityDrawColor(pLocal, pEntity, Vars::Colors::Relative.Value); diff --git a/Amalgam/src/Features/Visuals/Radar/Radar.cpp b/Amalgam/src/Features/Visuals/Radar/Radar.cpp index 32a6377..45ae73a 100644 --- a/Amalgam/src/Features/Visuals/Radar/Radar.cpp +++ b/Amalgam/src/Features/Visuals/Radar/Radar.cpp @@ -1,5 +1,7 @@ #include "Radar.h" +#include "../../Players/PlayerUtils.h" + bool CRadar::GetDrawPosition(CTFPlayer* pLocal, CBaseEntity* pEntity, int& x, int& y, int& z) { const float flRange = Vars::Radar::Main::Range.Value; @@ -209,7 +211,8 @@ void CRadar::DrawPoints(CTFPlayer* pLocal) const int nIndex = pOwner->entindex(); if (nIndex != I::EngineClient->GetLocalPlayer() && pOwner != H::Entities.GetObservedTarget()) { - if (!(Vars::Radar::Buildings::Draw.Value & 1 << 3 && H::Entities.IsFriend(nIndex))) + if (!(Vars::Radar::Buildings::Draw.Value & 1 << 3 && H::Entities.IsFriend(nIndex)) + && !(Vars::Radar::Buildings::Draw.Value & 1 << 4 && F::PlayerUtils.GetPriority(nIndex) > F::PlayerUtils.mTags["Default"].Priority)) { if (!(Vars::Radar::Buildings::Draw.Value & 1 << 1) && pOwner->As()->m_iTeamNum() != pLocal->m_iTeamNum()) continue; @@ -282,7 +285,8 @@ void CRadar::DrawPoints(CTFPlayer* pLocal) const int nIndex = pPlayer->entindex(); if (nIndex != I::EngineClient->GetLocalPlayer() && pPlayer != H::Entities.GetObservedTarget()) { - if (!(Vars::Radar::Players::Draw.Value & 1 << 3 && H::Entities.IsFriend(nIndex))) + if (!(Vars::Radar::Players::Draw.Value & 1 << 3 && H::Entities.IsFriend(nIndex)) + && !(Vars::Radar::Players::Draw.Value & 1 << 4 && F::PlayerUtils.GetPriority(nIndex) > F::PlayerUtils.mTags["Default"].Priority)) { if (!(Vars::Radar::Players::Draw.Value & 1 << 1) && pPlayer->m_iTeamNum() != pLocal->m_iTeamNum()) continue; @@ -292,7 +296,7 @@ void CRadar::DrawPoints(CTFPlayer* pLocal) } else if (!(Vars::Radar::Players::Draw.Value & 1 << 0)) continue; - if (!(Vars::Radar::Players::Draw.Value & 1 << 4) && pPlayer->m_flInvisibility() >= 1.f) + if (!(Vars::Radar::Players::Draw.Value & 1 << 5) && pPlayer->m_flInvisibility() >= 1.f) continue; int x, y, z; diff --git a/Amalgam/src/SDK/Helpers/Entities/Entities.cpp b/Amalgam/src/SDK/Helpers/Entities/Entities.cpp index 56800b9..a458c2b 100644 --- a/Amalgam/src/SDK/Helpers/Entities/Entities.cpp +++ b/Amalgam/src/SDK/Helpers/Entities/Entities.cpp @@ -2,6 +2,7 @@ #include "../../SDK.h" #include "../../../Utils/Hash/FNV1A.h" +#include "../../../Features/Players/PlayerUtils.h" void CEntities::Fill() { @@ -158,6 +159,18 @@ void CEntities::Fill() break; } } + + m_mUPriorities.clear(); m_mIPriorities.clear(); + for (auto& pPlayer : m_mGroups[EGroupType::PLAYERS_ALL]) + { + PlayerInfo_t pi{}; + if (I::EngineClient->GetPlayerInfo(pPlayer->entindex(), &pi)) + { + int iPriority = F::PlayerUtils.GetPriority(pi.friendsID, false); + m_mUPriorities[pi.friendsID] = iPriority; + m_mIPriorities[pPlayer->entindex()] = iPriority; + } + } } void CEntities::Clear() diff --git a/Amalgam/src/SDK/Helpers/Entities/Entities.h b/Amalgam/src/SDK/Helpers/Entities/Entities.h index b7b7f04..cd200bb 100644 --- a/Amalgam/src/SDK/Helpers/Entities/Entities.h +++ b/Amalgam/src/SDK/Helpers/Entities/Entities.h @@ -21,6 +21,8 @@ class CEntities std::unordered_map> m_mGroups = {}; std::unordered_map m_mIDIndex = {}; std::unordered_map m_mFriends; + std::unordered_map m_mUPriorities; + std::unordered_map m_mIPriorities; public: void Fill(); @@ -36,8 +38,10 @@ public: CTFPlayer* GetObservedTarget() { return m_pObservedTarget; } const std::vector& GetGroup(const EGroupType& Group) { return m_mGroups[Group]; } - bool IsFriend(int entIdx) { return m_mFriends[entIdx]; } + bool IsFriend(int iIndex) { return m_mFriends[iIndex]; } bool IsFriend(uint32_t friendsID) { return m_mFriends[m_mIDIndex[friendsID]]; } + int GetPriority(uint32_t friendsID) { return m_mUPriorities[friendsID]; } + int GetPriority(int iIndex) { return m_mIPriorities[iIndex]; } }; ADD_FEATURE_CUSTOM(CEntities, Entities, H); \ No newline at end of file diff --git a/Amalgam/src/SDK/Vars.h b/Amalgam/src/SDK/Vars.h index 81930af..060d5fa 100644 --- a/Amalgam/src/SDK/Vars.h +++ b/Amalgam/src/SDK/Vars.h @@ -139,14 +139,14 @@ namespace Vars CVar(SplashRadius, 90.f) CVar(AutoRelease, 0.f) - CVar(iGroundSamples, 5, NOSAVE) // debug - CVar(iAirSamples, 5, NOSAVE) // debug + CVar(GroundSamples, 5, NOSAVE) // debug + CVar(AirSamples, 5, NOSAVE) // debug CVar(VerticalShift, 5.f, NOSAVE) // debug - CVar(LatOff, 0.f, NOSAVE) // debug - CVar(HullInc, 0.f, NOSAVE) // debug + CVar(LatencyOffset, 0.f, NOSAVE) // debug + CVar(HullIncrease, 0.f, NOSAVE) // debug CVar(DragOverride, 0.f, NOSAVE) // debug CVar(TimeOverride, 0.f, NOSAVE) // debug - CVar(HuntermanLerp, 50.f, NOSAVE) // debug + CVar(HuntsmanLerp, 50.f, NOSAVE) // debug CVar(SplashPoints, 80, NOSAVE) // debug CVar(SplashCount, 5, NOSAVE) // debug SUBNAMESPACE_END(Projectile) @@ -228,11 +228,11 @@ namespace Vars NAMESPACE_END(AntiHack) NAMESPACE_BEGIN(CheaterDetection) - CVar(Methods, 0b00001) // { Duck Speed, Aim flicking, Packet choking, Invalid pitch } + CVar(Methods, 0b00001) // { Duck Speed, Aim flicking, Packet choking, Invalid pitch } CVar(DetectionsRequired, 10) CVar(MinimumChoking, 20) - CVar(MinimumFlick, 20.f) // min flick size to suspect - CVar(MaximumNoise, 5.f) // max different between angles before and after flick + CVar(MinimumFlick, 20.f) // min flick size to suspect + CVar(MaximumNoise, 5.f) // max different between angles before and after flick NAMESPACE_END(CheaterDetection) NAMESPACE_BEGIN(ESP) @@ -274,6 +274,7 @@ namespace Vars SUBNAMESPACE_BEGIN(Player) CVar(Local, false, VISUAL) CVar(Friend, false, VISUAL) + CVar(Priority, false, VISUAL) CVar(VisibleMaterial, std::vector { "Original" }, VISUAL) CVar(OccludedMaterial, std::vector {}, VISUAL) @@ -351,6 +352,7 @@ namespace Vars SUBNAMESPACE_BEGIN(Player) CVar(Local, false, VISUAL) CVar(Friend, false, VISUAL) + CVar(Priority, false, VISUAL) CVar(Stencil, false, VISUAL) CVar(Blur, false, VISUAL) @@ -556,7 +558,7 @@ namespace Vars CVar(Enabled, false, VISUAL) CVar(Background, true, VISUAL) CVar(IconType, 1, VISUAL) // 0 - Icons, 1 - Portraits, 2 - Avatars - CVar(Draw, 0b11010, VISUAL) // { Cloaked, Friends, Team, Enemy, Local } + CVar(Draw, 0b101010, VISUAL) // { Cloaked, Priority, Friends, Team, Enemy, Local } CVar(IconSize, 24, VISUAL) CVar(Health, false, VISUAL) CVar(Height, false, VISUAL) @@ -565,7 +567,7 @@ namespace Vars SUBNAMESPACE_BEGIN(Buildings) CVar(Enabled, false, VISUAL) CVar(Background, true, VISUAL) - CVar(Draw, 0b1011, VISUAL) // { Friends, Team, Enemy, Local } + CVar(Draw, 0b01011, VISUAL) // { Priority, Friends, Team, Enemy, Local } CVar(Health, false, VISUAL) CVar(IconSize, 18, VISUAL) SUBNAMESPACE_END(Buildings) @@ -721,27 +723,4 @@ namespace Vars CVar(ServerHitbox, false, NOSAVE) CVar(AntiAimLines, false, NOSAVE) NAMESPACE_END(Debug) - - NAMESPACE_BEGIN(Fonts) - SUBNAMESPACE_BEGIN(FONT_ESP) - CVar(szName, std::string("Tahoma"), VISUAL | NOCOND) - CVar(nTall, 12, VISUAL | NOCOND) - CVar(nWeight, 0, VISUAL | NOCOND) - CVar(nFlags, 512, VISUAL | NOCOND) - SUBNAMESPACE_END(FONT_ESP) - - SUBNAMESPACE_BEGIN(FONT_NAME) - CVar(szName, std::string("Tahoma"), VISUAL | NOCOND) - CVar(nTall, 12, VISUAL | NOCOND) - CVar(nWeight, 0, VISUAL | NOCOND) - CVar(nFlags, 512, VISUAL | NOCOND) - SUBNAMESPACE_END(FONT_NAME) - - SUBNAMESPACE_BEGIN(FONT_INDICATORS) - CVar(szName, std::string("Tahoma"), VISUAL | NOCOND) - CVar(nTall, 13, VISUAL | NOCOND) - CVar(nWeight, -1, VISUAL | NOCOND) - CVar(nFlags, 512, VISUAL | NOCOND) - SUBNAMESPACE_END(FONT_INDICATORS) - NAMESPACE_END(Fonts) } \ No newline at end of file