From 027ba424461fabcc376dfd15abdf4cfa8659a83e Mon Sep 17 00:00:00 2001 From: raax7 Date: Thu, 28 Mar 2024 20:28:35 +0000 Subject: [PATCH] Fixed Chams - Fixed chams auto revert - Added chams color picker --- Fortnite Internal/Configs/Config.h | 8 ++++---- .../Game/Features/FortPawnHelper/Chams.cpp | 13 +++++++++---- .../Game/Features/FortPawnHelper/Chams.h | 2 ++ Fortnite Internal/Game/Game.cpp | 4 ++++ 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Fortnite Internal/Configs/Config.h b/Fortnite Internal/Configs/Config.h index 70f26e3..50aef2e 100644 --- a/Fortnite Internal/Configs/Config.h +++ b/Fortnite Internal/Configs/Config.h @@ -77,7 +77,7 @@ namespace Config { //inline bool ShowDistance = true; //inline bool ShowName = true; - inline bool CopyAimbotFOV = true; + inline bool CopyAimbotFOV = false; inline float Height = 10.f; inline float Width = 10.f; @@ -97,13 +97,13 @@ namespace Config { inline bool CurrentWeapon = true; // Chams - inline bool Chams = false; - - inline bool SelfChams = false; + inline bool Chams = true; + inline bool SelfChams = true; inline bool Wireframe = true; inline float GlowAmount = 1.f; + inline float ChamsColor[3] = { 1.f, 0.f, 0.75f }; } namespace Weapons { diff --git a/Fortnite Internal/Game/Features/FortPawnHelper/Chams.cpp b/Fortnite Internal/Game/Features/FortPawnHelper/Chams.cpp index 3cb5534..9edb324 100644 --- a/Fortnite Internal/Game/Features/FortPawnHelper/Chams.cpp +++ b/Fortnite Internal/Game/Features/FortPawnHelper/Chams.cpp @@ -65,7 +65,7 @@ void Features::FortPawnHelper::Chams::Tick(SDK::AFortPawn* FortPawn) { bool PawnInList = it != ChammedPawns.end(); - if (SDK::IsValidPointer(FortPawn)) { + if (SDK::IsValidPointer(FortPawn) && ShouldApplyChams(FortPawn)) { if (PawnInList == false) { // Apply the chams if (ApplyChams(FortPawn, SDK::GetChamsMaterialDynamic())) { @@ -91,13 +91,17 @@ void Features::FortPawnHelper::Chams::Tick(SDK::AFortPawn* FortPawn) { void Features::FortPawnHelper::Chams::UpdateDynamicMaterialSettings() { // Set the colors - SDK::GetChamsMaterialDynamic()->SetVectorParameterValue(SColor1, SDK::FLinearColor(1.f, 0.f, 0.75f, 1.f)); - SDK::GetChamsMaterialDynamic()->SetVectorParameterValue(SColor2, SDK::FLinearColor(1.f, 0.f, 0.75f, 1.f)); + SDK::GetChamsMaterialDynamic()->SetVectorParameterValue(SColor1, SDK::FLinearColor(Config::Visuals::Players::ChamsColor[0], Config::Visuals::Players::ChamsColor[1], Config::Visuals::Players::ChamsColor[2], 1.f)); + SDK::GetChamsMaterialDynamic()->SetVectorParameterValue(SColor2, SDK::FLinearColor(Config::Visuals::Players::ChamsColor[0], Config::Visuals::Players::ChamsColor[1], Config::Visuals::Players::ChamsColor[2], 1.f)); // Set the emissive brightness SDK::GetChamsMaterialDynamic()->SetScalarParameterValue(DissolvePatternEmissiveBrightness, Config::Visuals::Players::GlowAmount); SDK::GetChamsMaterialDynamic()->SetScalarParameterValue(GradientPassEmissiveA, Config::Visuals::Players::GlowAmount); SDK::GetChamsMaterialDynamic()->SetScalarParameterValue(GradientPassEmissiveB, Config::Visuals::Players::GlowAmount); + + // Set the opacities + SDK::GetChamsMaterialDynamic()->SetScalarParameterValue(SOpacity, 1.f); + SDK::GetChamsMaterialDynamic()->SetScalarParameterValue(Opacity, 1.f); } void Features::FortPawnHelper::Chams::UpdateMaterialSettings() { @@ -112,5 +116,6 @@ void Features::FortPawnHelper::Chams::Init() { SColor2 = SDK::FName(skCrypt(L"S Color2")); DissolvePatternEmissiveBrightness = SDK::FName(skCrypt(L"Dissolve Pattern Emissive Brightness")); GradientPassEmissiveA = SDK::FName(skCrypt(L"Gradient Pass Emissive A")); - GradientPassEmissiveB = SDK::FName(skCrypt(L"Gradient Pass Emissive B")); + SOpacity = SDK::FName(skCrypt(L"S Opacity")); + Opacity = SDK::FName(skCrypt(L"Opacity")); } \ No newline at end of file diff --git a/Fortnite Internal/Game/Features/FortPawnHelper/Chams.h b/Fortnite Internal/Game/Features/FortPawnHelper/Chams.h index 93371d8..c0df8c8 100644 --- a/Fortnite Internal/Game/Features/FortPawnHelper/Chams.h +++ b/Fortnite Internal/Game/Features/FortPawnHelper/Chams.h @@ -25,6 +25,8 @@ namespace Features { inline SDK::FName DissolvePatternEmissiveBrightness; inline SDK::FName GradientPassEmissiveA; inline SDK::FName GradientPassEmissiveB; + inline SDK::FName SOpacity; + inline SDK::FName Opacity; /* Array of ChammedPawns used for auto reverting materials */ inline std::vector> ChammedPawns; diff --git a/Fortnite Internal/Game/Game.cpp b/Fortnite Internal/Game/Game.cpp index 2aabb8b..73aeba7 100644 --- a/Fortnite Internal/Game/Game.cpp +++ b/Fortnite Internal/Game/Game.cpp @@ -266,6 +266,10 @@ void Game::MenuCallback() { ImGui::Checkbox(skCrypt("Chams"), &Config::Visuals::Players::Chams); if (Config::Visuals::Players::Chams) { + if (ImGui::ColorEdit3(skCrypt("Chams Color"), Config::Visuals::Players::ChamsColor)) { + Features::FortPawnHelper::Chams::UpdateDynamicMaterialSettings(); + } + ImGui::Checkbox(skCrypt("Self Chams"), &Config::Visuals::Players::SelfChams); ImGui::Checkbox(skCrypt("Wireframe"), &Config::Visuals::Players::Wireframe); if (ImGui::SliderFloat(skCrypt("Glow Amount"), &Config::Visuals::Players::GlowAmount, 0.f, 100.f)) {