fix cheat god, fix 1.7.2, 1.8, 2.4.2, and probably 2.5, add rocket event idk couldnt test, fix some crashes.
This commit is contained in:
Milxnor
2023-04-25 18:22:59 -04:00
parent 358a2a9ef2
commit 93d18a3fe9
19 changed files with 180 additions and 40 deletions

View File

@@ -8,13 +8,40 @@
#include "AthenaMarkerComponent.h"
#include "FortVolume.h"
static void ApplyCID(AFortPlayerPawn* Pawn, UObject* CID, bool bUseServerChoosePart = false)
static bool ApplyCID(AFortPlayerPawn* Pawn, UObject* CID, bool bUseServerChoosePart = false)
{
if (!CID)
return;
return false;
if (!Pawn && bUseServerChoosePart)
return;
auto PlayerController = Cast<AFortPlayerController>(Pawn->GetController());
if (!PlayerController)
return false;
/* auto PCCosmeticLoadout = PlayerController->GetCosmeticLoadout();
if (!PCCosmeticLoadout)
{
LOG_INFO(LogCosmetics, "PCCosmeticLoadout is not set! Will not be able to apply skin.");
return false;
}
auto PawnCosmeticLoadout = PlayerController->GetCosmeticLoadout();
if (!PawnCosmeticLoadout)
{
LOG_INFO(LogCosmetics, "PawnCosmeticLoadout is not set! Will not be able to apply skin.");
return false;
}
PCCosmeticLoadout->GetCharacter() = CID;
PawnCosmeticLoadout->GetCharacter() = CID;
PlayerController->ApplyCosmeticLoadout(); // would cause recursive
return true; */
if (Engine_Version == 416)
return false;
static auto HeroDefinitionOffset = CID->GetOffset("HeroDefinition");
auto HeroDefinition = CID->Get(HeroDefinitionOffset);