Files
Project-Reboot-3.0/Project Reboot 3.0/PlayerController.cpp
Milxnor 94beb39a4f i havehomework to do
fix issue with teams, add loot, fix building bug, added something properly, fix issue with ai, add end event c2 but doesnt really work
2023-05-14 23:14:36 -04:00

43 lines
1.3 KiB
C++

#include "PlayerController.h"
#include "GameplayStatics.h"
#include "reboot.h"
void APlayerController::ServerChangeName(FString& S)
{
static auto ServerChangeNameFn = FindObject<UFunction>("/Script/Engine.PlayerController.ServerChangeName");
this->ProcessEvent(ServerChangeNameFn, &S);
}
void APlayerController::SetPlayerIsWaiting(bool NewValue)
{
static auto bPlayerIsWaitingOffset = GetOffset("bPlayerIsWaiting");
static auto bPlayerIsWaitingFieldMask = GetFieldMask(this->GetProperty("bPlayerIsWaiting"));
this->SetBitfieldValue(bPlayerIsWaitingOffset, bPlayerIsWaitingFieldMask, NewValue);
}
UCheatManager*& APlayerController::SpawnCheatManager(UClass* CheatManagerClass)
{
GetCheatManager() = UGameplayStatics::SpawnObject<UCheatManager>(CheatManagerClass, this, true);
return GetCheatManager();
}
FRotator APlayerController::GetControlRotation()
{
static auto fn = FindObject<UFunction>(L"/Script/Engine.Controller.GetControlRotation");
FRotator rot;
this->ProcessEvent(fn, &rot);
return rot;
}
void APlayerController::ServerRestartPlayer()
{
static auto fn = FindObject<UFunction>(L"/Script/Engine.PlayerController.ServerRestartPlayer");
this->ProcessEvent(fn);
}
UClass* APlayerController::StaticClass()
{
static auto Class = FindObject<UClass>(L"/Script/Engine.PlayerController");
return Class;
}