From 2366cadc8cd294cd5ddb06abb95752d7d019c927 Mon Sep 17 00:00:00 2001 From: PADO <62028267+47PADO47@users.noreply.github.com> Date: Mon, 18 Mar 2024 01:03:30 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Use=20APortalWarsCharacter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Internal/hook/Features.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Internal/hook/Features.h b/Internal/hook/Features.h index 9ba85cb..a4adf85 100644 --- a/Internal/hook/Features.h +++ b/Internal/hook/Features.h @@ -4,6 +4,7 @@ #include "../utils/Logger.h" #include "../discord/rpc.h" #include "../scripting/Scripts.h" +#include "../utils/Globals.h" class Features { public: @@ -13,6 +14,8 @@ class Features { do { ExecuteUserScripts(); + APortalWarsCharacter* Player = (APortalWarsCharacter*)PlayerController->Character; + if (Settings.MISC.DestroyConsole) { Settings.MISC.DestroyConsole = false; Logger::DestroyConsole(); @@ -25,6 +28,10 @@ class Features { PlayerController->FOV(Settings.EXPLOITS.FOV); if (Settings.MISC.LoadIntoMap) { + //TODO Enable Play Button + //UPortalWarsPlayButtonWidget:UPortalWarsButtonWidget:UPortalWarsGenericButton:UPortalWarsUserWidget:UUserWidget:UWidget:UVisual:UObject + //bool IsEnabled(); // Function PortalWars.PortalWarsButtonWidget.IsEnabled // (Native|Public|Const) // @ game+0x1664af0 + Logger::Log("INFO", "Loading into map"); PlayerController->SwitchLevel(L"Simulation_Alpha"); Settings.MISC.LoadIntoMap = false; @@ -36,8 +43,7 @@ class Features { }; SetState("In game"); - APawn* Player = PlayerController->PlayerState->PawnPrivate; - USkeletalMeshComponent* Mesh = Player->Mesh; + USkeletalMeshComponent* Mesh = PlayerController->Character->Mesh; collision = false; if (GetAsyncKeyState(Settings.EXPLOITS.NoClip)) collision = !collision; @@ -56,6 +62,7 @@ class Features { Mesh->K2_SetRelativeRotation(FRotator(0.f, spin_yaw, 0.f), true, false); spin_yaw += 20.f; }; + } while (false); return; @@ -74,9 +81,10 @@ class Features { return rpc->UpdateState(state); } - void UpdatePlayerHealth(APawn* Player) { + void UpdatePlayerHealth(APortalWarsCharacter* Player) { if (Settings.EXPLOITS.GodMode) { - float health = 999999; + float health = 9999; + if (Player->MaxHealth != health) Player->MaxHealth = health; if (Player->Health != health) Player->Health = health;