Skip to content

Commit

Permalink
♻️ Use APortalWarsCharacter
Browse files Browse the repository at this point in the history
  • Loading branch information
47PADO47 committed Mar 18, 2024
1 parent 676eaa9 commit 2366cad
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Internal/hook/Features.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "../utils/Logger.h"
#include "../discord/rpc.h"
#include "../scripting/Scripts.h"
#include "../utils/Globals.h"

class Features {
public:
Expand All @@ -13,6 +14,8 @@ class Features {
do {
ExecuteUserScripts();

APortalWarsCharacter* Player = (APortalWarsCharacter*)PlayerController->Character;

if (Settings.MISC.DestroyConsole) {
Settings.MISC.DestroyConsole = false;
Logger::DestroyConsole();
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 2366cad

Please sign in to comment.