Minor Push

- Fixed a couple things
- Added revert all to AutoRevertFeature
- Added NoTilting to vehicle fly
- Removed double SetReloadTime
This commit is contained in:
raax7
2024-03-17 16:17:05 +00:00
parent b9330880ed
commit b3c71855a8
8 changed files with 84 additions and 69 deletions
+1 -2
View File
@@ -108,12 +108,11 @@ namespace Config {
}
namespace Vehicle {
inline bool Enabled = false;
inline bool InfiniteBoost = false;
inline bool Fly = false;
inline bool FlyThroughWalls = false;
inline bool FreezeInAir = false;
inline bool NoTilting = false;
inline float FlySpeed = 35.f;
}
+3
View File
@@ -6,6 +6,7 @@
#include "Drawing/RaaxGUI/RaaxGUI.h"
#endif // _ENGINE
#include "Game/Features/Features.h"
#include "Game/Input/Input.h"
#include "Game/SDK/SDK.h"
#include "Hooks/Hooks.h"
@@ -58,6 +59,8 @@ VOID UnloadThread() {
RaaxDx::Unhook();
#endif // _IMGUI
Features::RevertAll();
// Free library
LI_FN(FreeLibraryAndExitThread).safe()(ThisModule, 0);
}
@@ -7,90 +7,99 @@
#include "../../Actors/ActorCache.h"
#include "../../Input/Input.h"
#include "../../../Utilities/Math.h"
std::chrono::steady_clock::time_point Features::Exploits::Vehicle::LastTeleportTime = std::chrono::steady_clock::now();
void* Features::Exploits::Vehicle::VehicleLastTick = nullptr;
bool Features::Exploits::Vehicle::WasNoCollisionLastTick = false;
void Features::Exploits::Vehicle::Tick() {
SDK::AFortAthenaVehicle* Vehicle = reinterpret_cast<SDK::AFortPawn*>(SDK::GetLocalPawn())->GetVehicle();
if (Vehicle) {
if (Config::Exploits::Vehicle::Enabled) {
if (Config::Exploits::Vehicle::InfiniteBoost) {
if (Vehicle->IsA(SDK::AFortAthenaAntelopeVehicle::StaticClass())) {
SDK::AFortAthenaAntelopeVehicle* Antelope = reinterpret_cast<SDK::AFortAthenaAntelopeVehicle*>(Vehicle);
VehicleLastTick = Vehicle;
Antelope->FortAntelopeVehicleConfigs()->SetBoostAccumulationRate(FLT_MAX, &Config::Exploits::Vehicle::InfiniteBoost);
Antelope->FortAntelopeVehicleConfigs()->SetBoostExpenseRate(0.f, &Config::Exploits::Vehicle::InfiniteBoost);
}
if (Config::Exploits::Vehicle::InfiniteBoost) {
if (Vehicle->IsA(SDK::AFortAthenaAntelopeVehicle::StaticClass())) {
SDK::AFortAthenaAntelopeVehicle* Antelope = reinterpret_cast<SDK::AFortAthenaAntelopeVehicle*>(Vehicle);
if (Vehicle->IsA(SDK::AFortAthenaJackalVehicle::StaticClass())) {
SDK::AFortAthenaJackalVehicle* Jackal = reinterpret_cast<SDK::AFortAthenaJackalVehicle*>(Vehicle);
Antelope->FortAntelopeVehicleConfigs()->SetBoostAccumulationRate(FLT_MAX, &Config::Exploits::Vehicle::InfiniteBoost);
Antelope->FortAntelopeVehicleConfigs()->SetBoostExpenseRate(0.f, &Config::Exploits::Vehicle::InfiniteBoost);
}
for (int i = 0; i < Jackal->BoostTimers().Num(); i++) {
Jackal->BoostTimers()[i].SetCharge(1.0f);
}
}
if (Vehicle->IsA(SDK::AFortAthenaJackalVehicle::StaticClass())) {
SDK::AFortAthenaJackalVehicle* Jackal = reinterpret_cast<SDK::AFortAthenaJackalVehicle*>(Vehicle);
if (Vehicle->IsA(SDK::AFortAthenaDoghouseVehicle::StaticClass())) {
SDK::AFortAthenaDoghouseVehicle* Doghouse = reinterpret_cast<SDK::AFortAthenaDoghouseVehicle*>(Vehicle);
Doghouse->BoostAction()->SetCharge(1.0f);
for (int i = 0; i < Jackal->BoostTimers().Num(); i++) {
Jackal->BoostTimers()[i].SetCharge(1.0f);
}
}
if (Config::Exploits::Vehicle::Fly) {
float MoveForwardBackward = 0.0f;
float MoveLeftRight = 0.0f;
float MoveUpDown = 0.0f;
if (Vehicle->IsA(SDK::AFortAthenaDoghouseVehicle::StaticClass())) {
SDK::AFortAthenaDoghouseVehicle* Doghouse = reinterpret_cast<SDK::AFortAthenaDoghouseVehicle*>(Vehicle);
if (Input::IsKeyDown(Input::KeyName::W)) MoveForwardBackward += 1.0f;
if (Input::IsKeyDown(Input::KeyName::S)) MoveForwardBackward -= 1.0f;
if (Input::IsKeyDown(Input::KeyName::A)) MoveLeftRight -= 1.0f;
if (Input::IsKeyDown(Input::KeyName::D)) MoveLeftRight += 1.0f;
if (Input::IsKeyDown(Input::KeyName::SpaceBar)) MoveUpDown += 1.0f;
if (Input::IsKeyDown(Input::KeyName::LeftControl)) MoveUpDown -= 1.0f;
Doghouse->BoostAction()->SetCharge(1.0f);
}
}
SDK::FRotator ModifiedRotation = Actors::MainCamera.Rotation;
// Make the camera be looking more downward so the player doesn't have to look so high they can't see the floor just to go straight forward
ModifiedRotation.Pitch -= 20.f;
// Normalize the pitch so it doesn't go over 90 or under -90
ModifiedRotation.Pitch = Math::NormalizeAngle(ModifiedRotation.Pitch);
if (Config::Exploits::Vehicle::Fly) {
float MoveForwardBackward = 0.0f;
float MoveLeftRight = 0.0f;
float MoveUpDown = 0.0f;
SDK::FVector ForwardVector = SDK::UKismetMathLibrary::StaticClass()->GetForwardVector(Actors::MainCamera.Rotation);
if (Input::IsKeyDown(Input::KeyName::W)) MoveForwardBackward += 1.0f;
if (Input::IsKeyDown(Input::KeyName::S)) MoveForwardBackward -= 1.0f;
if (Input::IsKeyDown(Input::KeyName::A)) MoveLeftRight -= 1.0f;
if (Input::IsKeyDown(Input::KeyName::D)) MoveLeftRight += 1.0f;
if (Input::IsKeyDown(Input::KeyName::SpaceBar)) MoveUpDown += 1.0f;
if (Input::IsKeyDown(Input::KeyName::LeftControl)) MoveUpDown -= 1.0f;
SDK::FVector MovementDirection = ForwardVector * MoveForwardBackward +
SDK::UKismetMathLibrary::StaticClass()->GetRightVector(Actors::MainCamera.Rotation) * MoveLeftRight +
SDK::FVector(0, 0, 1) * MoveUpDown;
SDK::FRotator CameraRotation = Actors::MainCamera.Rotation;
SDK::FVector ForwardVector = SDK::FVector();
SDK::FVector NewLocation = Vehicle->GetRootComponent()->GetPosition() + (MovementDirection * Config::Exploits::Vehicle::FlySpeed);
// Adjust NewLocation for 60 FPS using LastTeleportTime (so it doesn't depend on FPS)
NewLocation = NewLocation + MovementDirection * (Config::Exploits::Vehicle::FlySpeed / 60.f) * std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - LastTeleportTime).count();
if (Config::Exploits::Vehicle::NoTilting) {
SDK::FRotator AdjustedCameraRotation = Actors::MainCamera.Rotation;
AdjustedCameraRotation.Pitch = 0.f;
if (MovementDirection != SDK::FVector()) {
Vehicle->K2_TeleportTo(NewLocation, Actors::MainCamera.Rotation);
ForwardVector = SDK::UKismetMathLibrary::StaticClass()->GetForwardVector(AdjustedCameraRotation);
if (Config::Exploits::Vehicle::FlyThroughWalls) {
Vehicle->SetActorEnableCollision(false); // ADD AUTO REVERT TO THIS
}
else {
Vehicle->SetActorEnableCollision(true); // ADD AUTO REVERT TO THIS
}
ForwardVector.Z = 0.f;
CameraRotation.Pitch = 0.f;
}
else {
ForwardVector = SDK::UKismetMathLibrary::StaticClass()->GetForwardVector(Actors::MainCamera.Rotation);
}
// If FreezeInAir is off, only freeze the vehicle when it's flying
if (Config::Exploits::Vehicle::FreezeInAir == false) {
Vehicle->GetRootComponent()->SetPhysicsLinearVelocity(SDK::FVector(0, 0, 0), false, SDK::FName());
}
SDK::FVector MovementDirection = ForwardVector * MoveForwardBackward +
SDK::UKismetMathLibrary::StaticClass()->GetRightVector(Actors::MainCamera.Rotation) * MoveLeftRight +
SDK::FVector(0, 0, 1) * MoveUpDown;
SDK::FVector NewLocation = Vehicle->GetRootComponent()->GetPosition() + (MovementDirection * Config::Exploits::Vehicle::FlySpeed);
// Adjust NewLocation for 60 FPS using LastTeleportTime (so it doesn't depend on FPS)
NewLocation = NewLocation + MovementDirection * (Config::Exploits::Vehicle::FlySpeed / 60.f) * std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - LastTeleportTime).count();
if (MovementDirection != SDK::FVector()) {
Vehicle->K2_TeleportTo(NewLocation, CameraRotation);
if (Config::Exploits::Vehicle::FlyThroughWalls) {
WasNoCollisionLastTick = true;
Vehicle->SetActorEnableCollision(false); // ADD AUTO REVERT TO THIS
}
else {
Vehicle->K2_SetActorRotation(Actors::MainCamera.Rotation, true);
Vehicle->SetActorEnableCollision(true); // ADD AUTO REVERT TO THIS
}
if (Config::Exploits::Vehicle::FreezeInAir) {
// If FreezeInAir is off, only freeze the vehicle when it's flying
if (Config::Exploits::Vehicle::FreezeInAir == false) {
Vehicle->GetRootComponent()->SetPhysicsLinearVelocity(SDK::FVector(0, 0, 0), false, SDK::FName());
}
}
else {
Vehicle->K2_SetActorRotation(CameraRotation, true);
}
LastTeleportTime = std::chrono::steady_clock::now();
}
}
if (Config::Exploits::Vehicle::FreezeInAir) {
Vehicle->GetRootComponent()->SetPhysicsLinearVelocity(SDK::FVector(0, 0, 0), false, SDK::FName());
}
LastTeleportTime = std::chrono::steady_clock::now();
}
}
}
@@ -9,6 +9,9 @@ namespace Features {
public:
static void Tick();
static bool WasNoCollisionLastTick;
static void* VehicleLastTick;
static const float IntervalSeconds;
static std::chrono::steady_clock::time_point LastTeleportTime;
};
@@ -40,7 +40,6 @@ void Features::Exploits::Weapons::Tick(SDK::AFortWeapon* Weapon) {
if (Config::Exploits::Weapon::NoReload) {
RangedWeaponStats->SetReloadTime(0.f, &Config::Exploits::Weapon::NoReload);
RangedWeaponStats->SetReloadTime(0.f, &Config::Exploits::Weapon::NoReload);
}
if (Config::Exploits::Weapon::NoRecoil) {
@@ -137,6 +137,10 @@ namespace Features {
}
}
inline void RevertAll() {
AutoRevertFeatures.clear();
}
namespace Aimbot {
+6 -5
View File
@@ -216,13 +216,14 @@ void Game::MenuCallback() {
break;
case 3:
{
ImGui::Checkbox(skCrypt("Enabled").decrypt(), &Config::Exploits::Vehicle::Enabled);
ImGui::Checkbox(skCrypt("Infinite Boost").decrypt(), &Config::Exploits::Vehicle::InfiniteBoost);
ImGui::Checkbox(skCrypt("Fly").decrypt(), &Config::Exploits::Vehicle::Fly);
ImGui::Checkbox(skCrypt("Fly Through Walls").decrypt(), &Config::Exploits::Vehicle::FlyThroughWalls);
ImGui::Checkbox(skCrypt("Freeze In Air").decrypt(), &Config::Exploits::Vehicle::FreezeInAir);
ImGui::SliderFloat(skCrypt("Fly Speed").decrypt(), &Config::Exploits::Vehicle::FlySpeed, 35.f, 1000.f);
if (Config::Exploits::Vehicle::Fly) {
ImGui::Checkbox(skCrypt("Fly Through Walls (also makes flying better)").decrypt(), &Config::Exploits::Vehicle::FlyThroughWalls);
ImGui::Checkbox(skCrypt("Freeze In Air").decrypt(), &Config::Exploits::Vehicle::FreezeInAir);
ImGui::Checkbox(skCrypt("No Tilting").decrypt(), &Config::Exploits::Vehicle::NoTilting);
ImGui::SliderFloat(skCrypt("Fly Speed").decrypt(), &Config::Exploits::Vehicle::FlySpeed, 35.f, 1000.f);
}
}
break;
case 4:
-3
View File
@@ -98,10 +98,7 @@ void SDK::Init() {
};
std::vector<OffsetSearch> Offsets {
// REQUIRED FOR INITIALIZATION
OffsetSearch { skCrypt("GameViewportClient").decrypt(), skCrypt("GameInstance").decrypt(), &SDK::Cached::Offsets::GameViewportClient::GameInstance, nullptr },
// REQUIRED FOR INITIALIZATION
OffsetSearch { skCrypt("Engine").decrypt(), skCrypt("GameViewport").decrypt(), &SDK::Cached::Offsets::Engine::GameViewport, nullptr },
OffsetSearch { skCrypt("GameViewportClient").decrypt(), skCrypt("World").decrypt(), &SDK::Cached::Offsets::GameViewportClient::World, nullptr },
OffsetSearch { skCrypt("GameInstance").decrypt(), skCrypt("LocalPlayers").decrypt(), &SDK::Cached::Offsets::GameInstance::LocalPlayers, nullptr },