mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
too much stuff
fix s3, fix health + backpack bug on 1.11, change replciation, fix 7.20 & 12.61, fix backpack on >S9, probably some other stuff i forgot
This commit is contained in:
@@ -72,12 +72,19 @@ void AFortPlayerControllerAthena::ServerAcknowledgePossessionHook(APlayerControl
|
||||
auto PawnAsFort = Cast<AFortPlayerPawn>(Pawn);
|
||||
auto PlayerStateAsFort = Cast<AFortPlayerState>(Pawn->GetPlayerState());
|
||||
|
||||
if (Globals::bNoMCP)
|
||||
return;
|
||||
|
||||
if (!PawnAsFort)
|
||||
return;
|
||||
|
||||
if (Globals::bNoMCP)
|
||||
{
|
||||
static auto CustomCharacterPartClass = FindObject<UClass>("/Script/FortniteGame.CustomCharacterPart");
|
||||
static auto backpackPart = LoadObject("/Game/Characters/CharacterParts/Backpacks/NoBackpack.NoBackpack", CustomCharacterPartClass);
|
||||
|
||||
// PawnAsFort->ServerChoosePart(EFortCustomPartType::Backpack, backpackPart);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static auto UpdatePlayerCustomCharacterPartsVisualizationFn = FindObject<UFunction>("/Script/FortniteGame.FortKismetLibrary.UpdatePlayerCustomCharacterPartsVisualization");
|
||||
|
||||
if (!UpdatePlayerCustomCharacterPartsVisualizationFn)
|
||||
@@ -85,8 +92,41 @@ void AFortPlayerControllerAthena::ServerAcknowledgePossessionHook(APlayerControl
|
||||
auto CosmeticLoadout = ControllerAsFort->GetCosmeticLoadout();
|
||||
|
||||
if (CosmeticLoadout)
|
||||
{
|
||||
/* static auto Pawn_CosmeticLoadoutOffset = PawnAsFort->GetOffset("CosmeticLoadout");
|
||||
|
||||
if (Pawn_CosmeticLoadoutOffset != -1)
|
||||
{
|
||||
CopyStruct(PawnAsFort->GetPtr<__int64>(Pawn_CosmeticLoadoutOffset), CosmeticLoadout, FFortAthenaLoadout::GetStructSize());
|
||||
} */
|
||||
|
||||
ApplyCID(PawnAsFort, CosmeticLoadout->GetCharacter());
|
||||
|
||||
auto Backpack = CosmeticLoadout->GetBackpack();
|
||||
|
||||
if (Backpack)
|
||||
{
|
||||
static auto CharacterPartsOffset = Backpack->GetOffset("CharacterParts");
|
||||
|
||||
if (CharacterPartsOffset != -1)
|
||||
{
|
||||
auto& BackpackCharacterParts = Backpack->Get<TArray<UObject*>>(CharacterPartsOffset);
|
||||
|
||||
for (int i = 0; i < BackpackCharacterParts.Num(); i++)
|
||||
{
|
||||
auto BackpackCharacterPart = BackpackCharacterParts.at(i);
|
||||
|
||||
if (!BackpackCharacterPart)
|
||||
continue;
|
||||
|
||||
PawnAsFort->ServerChoosePart(EFortCustomPartType::Backpack, BackpackCharacterPart);
|
||||
}
|
||||
|
||||
// UFortKismetLibrary::ApplyCharacterCosmetics(GetWorld(), BackpackCharacterParts, PlayerStateAsFort, &aa);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user