clip size vehicles cheat command

This commit is contained in:
Milxnor
2023-03-12 16:00:26 -04:00
parent ea7086c85f
commit 32bcc705af
37 changed files with 803 additions and 57 deletions

View File

@@ -119,7 +119,8 @@ void AFortPlayerController::ServerAttemptInteractHook(UObject* Context, FFrame*
for (int i = 0; i < LootDrops.size(); i++)
{
AFortPickup::SpawnPickup(LootDrops.at(i).first, LocationToSpawnLoot, LootDrops.at(i).second, EFortPickupSourceTypeFlag::Container, EFortPickupSpawnSource::Unset, -1
auto& lootDrop = LootDrops.at(i);
AFortPickup::SpawnPickup(lootDrop.ItemDefinition, LocationToSpawnLoot, lootDrop.Count, EFortPickupSourceTypeFlag::Container, EFortPickupSpawnSource::Unset, lootDrop.LoadedAmmo
// , (AFortPawn*)PlayerController->GetPawn() // should we put this here?
);
}
@@ -180,6 +181,7 @@ void AFortPlayerController::ServerCreateBuildingActorHook(UObject* Context, FFra
if (Fortnite_Version >= 8.30)
{
struct FCreateBuildingActorData { uint32_t BuildingClassHandle; FVector BuildLoc; FRotator BuildRot; bool bMirrored; };
auto CreateBuildingData = (FCreateBuildingActorData*)Stack->Locals;
BuildLocation = CreateBuildingData->BuildLoc;
@@ -240,9 +242,12 @@ void AFortPlayerController::ServerCreateBuildingActorHook(UObject* Context, FFra
if (!BuildingActor)
return ServerCreateBuildingActorOriginal(Context, Stack, Ret);
// static auto OwnerPersistentIDOffset = BuildingActor->GetOffset("OwnerPersistentID");
// BuildingActor->Get<int>(OwnerPersistentIDOffset) = PlayerStateAthena->GetWorldPlayerId();
BuildingActor->SetPlayerPlaced(true);
BuildingActor->SetTeam(PlayerStateAthena->GetTeamIndex());
BuildingActor->InitializeBuildingActor(PlayerController, BuildingActor, true);
BuildingActor->SetTeam(PlayerStateAthena->GetTeamIndex());
return ServerCreateBuildingActorOriginal(Context, Stack, Ret);
}
@@ -311,9 +316,6 @@ void AFortPlayerController::ServerPlayEmoteItemHook(AFortPlayerController* Playe
int outHandle = 0;
FGameplayAbilitySpecHandle Handle{};
Handle.GenerateNewHandle();
FGameplayAbilitySpec* Spec = MakeNewSpec((UClass*)AbilityToUse, EmoteAsset, true);
static unsigned int* (*GiveAbilityAndActivateOnce)(UAbilitySystemComponent * ASC, int* outHandle, __int64 Spec)
@@ -492,10 +494,8 @@ void AFortPlayerController::ServerEditBuildingActorHook(AFortPlayerController* P
{
BuildingActor->SetPlayerPlaced(true);
if (auto PlayerState = Cast<AFortPlayerStateAthena>(PlayerController->GetPlayerState()))
BuildingActor->SetTeam(PlayerState->GetTeamIndex());
// BuildingActor->OnRep_Team();
// if (auto PlayerState = Cast<AFortPlayerStateAthena>(PlayerController->GetPlayerState()))
// BuildingActor->SetTeam(PlayerState->GetTeamIndex());
}
}