mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
creative stuff
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "SoftObjectPtr.h"
|
||||
#include "globals.h"
|
||||
#include "GameplayStatics.h"
|
||||
|
||||
void ApplyCID(AFortPlayerPawn* Pawn, UObject* CID)
|
||||
{
|
||||
@@ -51,6 +52,32 @@ void ApplyCID(AFortPlayerPawn* Pawn, UObject* CID)
|
||||
}
|
||||
}
|
||||
|
||||
void AFortPlayerControllerAthena::ServerTeleportToPlaygroundLobbyIslandHook(AFortPlayerControllerAthena* Controller)
|
||||
{
|
||||
auto Pawn = Controller->GetMyFortPawn();
|
||||
|
||||
if (!Pawn)
|
||||
return;
|
||||
|
||||
static auto FortPlayerStartCreativeClass = FindObject<UClass>("/Script/FortniteGame.FortPlayerStartCreative");
|
||||
auto AllCreativePlayerStarts = UGameplayStatics::GetAllActorsOfClass(GetWorld(), FortPlayerStartCreativeClass);
|
||||
|
||||
for (int i = 0; i < AllCreativePlayerStarts.Num(); i++)
|
||||
{
|
||||
auto CurrentPlayerStart = AllCreativePlayerStarts.at(i);
|
||||
|
||||
static auto PlayerStartTagsOffset = CurrentPlayerStart->GetOffset("PlayerStartTags");
|
||||
auto bHasSpawnTag = CurrentPlayerStart->Get<FGameplayTagContainer>(PlayerStartTagsOffset).Contains("Playground.LobbyIsland.Spawn");
|
||||
|
||||
if (!bHasSpawnTag)
|
||||
continue;
|
||||
|
||||
Pawn->TeleportTo(CurrentPlayerStart->GetActorLocation(), Pawn->GetActorRotation());
|
||||
}
|
||||
|
||||
AllCreativePlayerStarts.Free();
|
||||
}
|
||||
|
||||
void AFortPlayerControllerAthena::ServerAcknowledgePossessionHook(APlayerController* Controller, APawn* Pawn)
|
||||
{
|
||||
static auto AcknowledgedPawnOffset = Controller->GetOffset("AcknowledgedPawn");
|
||||
|
||||
Reference in New Issue
Block a user