mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
Bim bam boom
This commit is contained in:
@@ -125,7 +125,7 @@ public:
|
||||
|
||||
static UClass* StaticClass()
|
||||
{
|
||||
static auto Class = FindObject<UClass>("/Script/FortniteGame.FortAthenaMutator_InventoryOverride");
|
||||
static auto Class = FindObject<UClass>(L"/Script/FortniteGame.FortAthenaMutator_InventoryOverride");
|
||||
return Class;
|
||||
}
|
||||
};
|
||||
@@ -1439,8 +1439,6 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
||||
|
||||
bool bIsRespawningAllowed = GameState->IsRespawningAllowed(DeadPlayerState);
|
||||
|
||||
if (!bIsRespawningAllowed)
|
||||
{
|
||||
bool bDropInventory = true;
|
||||
|
||||
LoopMutators([&](AFortAthenaMutator* Mutator)
|
||||
@@ -1455,7 +1453,9 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
||||
}
|
||||
);
|
||||
|
||||
if (bDropInventory)
|
||||
if (bDropInventory
|
||||
&& !bIsRespawningAllowed
|
||||
)
|
||||
{
|
||||
auto WorldInventory = PlayerController->GetWorldInventory();
|
||||
|
||||
@@ -1511,6 +1511,8 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
||||
}
|
||||
}
|
||||
|
||||
if (!bIsRespawningAllowed)
|
||||
{
|
||||
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||
|
||||
LOG_INFO(LogDev, "PlayersLeft: {} IsDBNO: {}", GameState->GetPlayersLeft(), DeadPawn->IsDBNO());
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "FortAthenaMutator_GG.h"
|
||||
#include "FortAthenaMutator_InventoryOverride.h"
|
||||
#include "calendar.h"
|
||||
#include "hooking.h"
|
||||
|
||||
void AGameModeBase::RestartPlayerAtTransform(AController* NewPlayer, FTransform SpawnTransform)
|
||||
{
|
||||
@@ -120,19 +121,11 @@ APawn* AGameModeBase::SpawnDefaultPawnForHook(AGameModeBase* GameMode, AControll
|
||||
static auto DefaultPawnClassOffset = GameMode->GetOffset("DefaultPawnClass");
|
||||
GameMode->Get<UClass*>(DefaultPawnClassOffset) = PawnClass;
|
||||
|
||||
bool bUseSpawnActor = false;
|
||||
|
||||
#if 1
|
||||
static auto SpawnDefaultPawnAtTransformFn = FindObject<UFunction>(L"/Script/Engine.GameModeBase.SpawnDefaultPawnAtTransform");
|
||||
|
||||
FTransform SpawnTransform = StartSpot->GetTransform();
|
||||
APawn* NewPawn = nullptr;
|
||||
|
||||
if (bUseSpawnActor)
|
||||
{
|
||||
NewPawn = GetWorld()->SpawnActor<APawn>(PawnClass, SpawnTransform, CreateSpawnParameters(ESpawnActorCollisionHandlingMethod::AdjustIfPossibleButAlwaysSpawn));
|
||||
}
|
||||
else
|
||||
{
|
||||
struct { AController* NewPlayer; FTransform SpawnTransform; APawn* ReturnValue; }
|
||||
AGameModeBase_SpawnDefaultPawnAtTransform_Params{ NewPlayer, SpawnTransform };
|
||||
|
||||
@@ -142,11 +135,15 @@ APawn* AGameModeBase::SpawnDefaultPawnForHook(AGameModeBase* GameMode, AControll
|
||||
|
||||
LOG_INFO(LogDev, "Finished SpawnDefaultPawnAtTransformFn!");
|
||||
|
||||
NewPawn = AGameModeBase_SpawnDefaultPawnAtTransform_Params.ReturnValue;
|
||||
}
|
||||
auto NewPawn = AGameModeBase_SpawnDefaultPawnAtTransform_Params.ReturnValue;
|
||||
#else
|
||||
#endif
|
||||
|
||||
if (!NewPawn)
|
||||
{
|
||||
LOG_WARN(LogPlayer, "Failed to spawn pawn!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool bIsRespawning = false; // reel
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// LOG_INFO(LogDev, "Failed to find Key!!!");
|
||||
LOG_INFO(LogDev, "Failed to find Key!!!");
|
||||
|
||||
if (wasSuccessful)
|
||||
*wasSuccessful = false;
|
||||
|
||||
@@ -111,7 +111,7 @@ static inline AFortAthenaMutator_Bots* SpawnBotMutator() //sets up all the class
|
||||
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||
|
||||
static auto BGAClass = FindObject<UClass>(L"/Script/Engine.BlueprintGeneratedClass");
|
||||
static auto PhoebeMutatorClass = LoadObject<UClass>(L"/Game/Athena/AI/Phoebe/BP_Phoebe_Mutator.BP_Phoebe_Mutator_C", BGAClass);
|
||||
auto PhoebeMutatorClass = LoadObject<UClass>(L"/Game/Athena/AI/Phoebe/BP_Phoebe_Mutator.BP_Phoebe_Mutator_C", BGAClass);
|
||||
|
||||
if (!PhoebeMutatorClass)
|
||||
{
|
||||
|
||||
@@ -819,6 +819,7 @@ DWORD WINAPI Main(LPVOID)
|
||||
}
|
||||
|
||||
LOG_INFO(LogInit, "Initializing Project Reboot!");
|
||||
LOG_INFO(LogDev, "Built on {} {}", __DATE__, __TIME__);
|
||||
|
||||
Addresses::SetupVersion();
|
||||
|
||||
@@ -915,7 +916,6 @@ DWORD WINAPI Main(LPVOID)
|
||||
|
||||
Hooking::MinHook::Hook((PVOID)Addresses::KickPlayer, (PVOID)AGameSession::KickPlayerHook, (PVOID*)&AGameSession::KickPlayerOriginal);
|
||||
|
||||
LOG_INFO(LogDev, "Built on {} {}", __DATE__, __TIME__);
|
||||
LOG_INFO(LogDev, "Size: 0x{:x}", sizeof(TMap<FName, void*>));
|
||||
|
||||
Hooking::MinHook::Hook((PVOID)Addresses::ActorGetNetMode, (PVOID)GetNetModeHook2, nullptr);
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace Globals
|
||||
extern inline bool bStartedListening = false;
|
||||
extern inline bool bAutoRestart = false; // doesnt work fyi
|
||||
extern inline bool bFillVendingMachines = true;
|
||||
extern inline bool bPrivateIPsAreOperator = true;
|
||||
extern inline int AmountOfListens = 0; // TODO: Switch to this for LastNum
|
||||
extern inline bool bDeveloperMode = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user