mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
respawn button and "suicide" in console (no cheat)
This commit is contained in:
@@ -711,6 +711,32 @@ void AFortPlayerController::ServerAttemptAircraftJumpHook(AFortPlayerController*
|
||||
// return ServerAttemptAircraftJumpOriginal(PC, ClientRotation);
|
||||
}
|
||||
|
||||
void AFortPlayerController::ServerSuicideHook(AFortPlayerController* PlayerController)
|
||||
{
|
||||
auto Pawn = PlayerController->GetPawn();
|
||||
|
||||
if (!Pawn)
|
||||
return;
|
||||
|
||||
// theres some other checks here idk
|
||||
|
||||
if (!Pawn->IsA(AFortPlayerPawn::StaticClass())) // Why FortPlayerPawn? Ask Fortnite
|
||||
return;
|
||||
|
||||
// suicide doesn't actually call force kill but its basically the same function
|
||||
|
||||
static auto ForceKillFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPawn.ForceKill"); // exists on 1.2 and 19.10 with same params so I assume it's the same on every other build.
|
||||
|
||||
FGameplayTag DeathReason; // unused on 1.7.2
|
||||
AActor* KillerActor = nullptr; // its just 0 in suicide (not really but easiest way to explain it)
|
||||
|
||||
struct { FGameplayTag DeathReason; AController* KillerController; AActor* KillerActor; } AFortPawn_ForceKill_Params{ DeathReason, PlayerController, KillerActor };
|
||||
|
||||
Pawn->ProcessEvent(ForceKillFn, &AFortPawn_ForceKill_Params);
|
||||
|
||||
//PlayerDeathReport->ServerTimeForRespawn && PlayerDeathReport->ServerTimeForResurrect = 0? // I think this is what they do on 1.7.2 I'm too lazy to double check though.
|
||||
}
|
||||
|
||||
void AFortPlayerController::ServerDropAllItemsHook(AFortPlayerController* PlayerController, UFortItemDefinition* IgnoreItemDef)
|
||||
{
|
||||
LOG_INFO(LogDev, "DropAllItems!");
|
||||
|
||||
@@ -140,6 +140,8 @@ public:
|
||||
void DropAllItems(const std::vector<UFortItemDefinition*>& IgnoreItemDefs, bool bIgnoreSecondaryQuickbar = false, bool bRemoveIfNotDroppable = false, bool RemovePickaxe = false);
|
||||
void ApplyCosmeticLoadout();
|
||||
|
||||
static void ServerSuicideHook(AFortPlayerController* PlayerController);
|
||||
|
||||
static void ServerLoadingScreenDroppedHook(UObject* Context, FFrame* Stack, void* Ret);
|
||||
static void ServerRepairBuildingActorHook(AFortPlayerController* PlayerController, ABuildingSMActor* BuildingActorToRepair);
|
||||
static void ServerExecuteInventoryItemHook(AFortPlayerController* PlayerController, FGuid ItemGuid);
|
||||
|
||||
@@ -432,6 +432,7 @@
|
||||
<ClInclude Include="NumericLimits.h" />
|
||||
<ClInclude Include="Object.h" />
|
||||
<ClInclude Include="ObjectMacros.h" />
|
||||
<ClInclude Include="objectviewer.h" />
|
||||
<ClInclude Include="OnlineReplStructs.h" />
|
||||
<ClInclude Include="OutputDevice.h" />
|
||||
<ClInclude Include="Package.h" />
|
||||
|
||||
@@ -939,6 +939,9 @@
|
||||
<ClInclude Include="FortDagwoodVehicle.h">
|
||||
<Filter>FortniteGame\Source\FortniteGame\Public\Athena\Vehicle</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="objectviewer.h">
|
||||
<Filter>Reboot\Public</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Engine">
|
||||
|
||||
@@ -13,7 +13,9 @@ namespace Calendar
|
||||
|
||||
static inline UObject* GetSnowSetup()
|
||||
{
|
||||
auto Class = FindObject<UClass>(L"/Game/Athena/Environments/Landscape/Blueprints/BP_SnowSetup.BP_SnowSetup_C");
|
||||
auto Class = FindObject<UClass>(L"/Game/Athena/Environments/Landscape/Blueprints/BP_SnowSetup.BP_SnowSetup_C") ? FindObject<UClass>(L"/Game/Athena/Environments/Landscape/Blueprints/BP_SnowSetup.BP_SnowSetup_C") :
|
||||
FindObject<UClass>(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C");
|
||||
|
||||
auto Actors = UGameplayStatics::GetAllActorsOfClass(GetWorld(), Class);
|
||||
|
||||
return Actors.Num() > 0 ? Actors.at(0) : nullptr;
|
||||
@@ -30,24 +32,55 @@ namespace Calendar
|
||||
// 15;
|
||||
return TimeAndValues[3].first;
|
||||
}
|
||||
else if (Fortnite_Version == 11.31)
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline void SetSnow(float NewValue)
|
||||
{
|
||||
static auto SetSnowFn = FindObject<UFunction>(L"/Game/Athena/Environments/Landscape/Blueprints/BP_SnowSetup.BP_SnowSetup_C.SetSnow");
|
||||
static auto SetSnowFn = FindObject<UFunction>(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.OnReady_0A511B314AE165C51798519FB84738B8") ? FindObject<UFunction>(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.OnReady_0A511B314AE165C51798519FB84738B8") :
|
||||
FindObject<UFunction>(L"/Game/Athena/Environments/Landscape/Blueprints/BP_SnowSetup.BP_SnowSetup_C.SetSnow");
|
||||
auto SnowSetup = GetSnowSetup();
|
||||
|
||||
LOG_INFO(LogDev, "SnowSetup: {}", SnowSetup->IsValidLowLevel() ? SnowSetup->GetFullName() : "BadRead");
|
||||
|
||||
if (SnowSetup)
|
||||
if (SnowSetup && SetSnowFn)
|
||||
{
|
||||
static auto OnReady_347B1F4D45630C357605FCB417D749A3Fn = FindObject<UFunction>(L"/Game/Athena/Environments/Landscape/Blueprints/BP_SnowSetup.BP_SnowSetup_C.OnReady_347B1F4D45630C357605FCB417D749A3");
|
||||
auto GameState = GetWorld()->GetGameState();
|
||||
SnowSetup->ProcessEvent(OnReady_347B1F4D45630C357605FCB417D749A3Fn, &GameState);
|
||||
auto GameState = (AFortGameStateAthena*)GetWorld()->GetGameState();
|
||||
|
||||
SnowSetup->ProcessEvent(SetSnowFn, &NewValue);
|
||||
GET_PLAYLIST(GameState)
|
||||
struct { UObject* GameState; UObject* Playlist; FGameplayTagContainer PlaylistContextTags; } OnReadyParams{ GameState, CurrentPlaylist, FGameplayTagContainer()};
|
||||
|
||||
UFunction* OnReadyFunc = FindObject<UFunction>(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.OnReady_0A511B314AE165C51798519FB84738B8");
|
||||
|
||||
LOG_INFO(LogDev, "Calling OnReady!");
|
||||
|
||||
if (OnReadyFunc)
|
||||
{
|
||||
SnowSetup->ProcessEvent(OnReadyFunc, &OnReadyParams);
|
||||
}
|
||||
|
||||
LOG_INFO(LogDev, "Called OnReady!");
|
||||
|
||||
if (NewValue != -1)
|
||||
{
|
||||
static auto SnowAmountOffset = SnowSetup->GetOffset("SnowAmount");
|
||||
SnowSetup->Get<float>(SnowAmountOffset) = NewValue;
|
||||
|
||||
static auto OnRep_Snow_AmountFn = FindObject<UFunction>("/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.OnRep_Snow_Amount");
|
||||
SnowSetup->ProcessEvent(OnRep_Snow_AmountFn);
|
||||
|
||||
// SnowSetup->ProcessEvent(SetSnowFn, &NewValue);
|
||||
}
|
||||
|
||||
LOG_INFO(LogDev, "Called SetSnow!");
|
||||
|
||||
static auto ada = FindObject<UFunction>(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.SetFullSnowEd");
|
||||
SnowSetup->ProcessEvent(ada);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -653,6 +653,9 @@ DWORD WINAPI Main(LPVOID)
|
||||
auto FortServerRestartPlayer = FortPlayerControllerDefault->VFTable[ServerReturnToMainMenuIdx];
|
||||
VirtualSwap(FortPlayerControllerAthenaDefault->VFTable, ServerReturnToMainMenuIdx, FortServerRestartPlayer);
|
||||
|
||||
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.ServerSuicide"),
|
||||
AFortPlayerController::ServerSuicideHook, nullptr, false);
|
||||
|
||||
// HookInstruction(Addresses::UpdateTrackedAttributesLea, (PVOID)AFortPlayerControllerAthena::UpdateTrackedAttributesHook, "/Script/Engine.PlayerController.EnableCheats", ERelativeOffsets::LEA, FortPlayerControllerAthenaDefault);
|
||||
// HookInstruction(Addresses::CombinePickupLea, (PVOID)AFortPickup::CombinePickupHook, "/Script/Engine.PlayerController.SetVirtualJoystickVisibility", ERelativeOffsets::LEA, FortPlayerControllerAthenaDefault);
|
||||
|
||||
|
||||
@@ -50,10 +50,11 @@
|
||||
#define DUMP_TAB 7
|
||||
#define UNBAN_TAB 8
|
||||
#define FUN_TAB 9
|
||||
#define DEVELOPER_TAB 10
|
||||
#define DEBUGLOG_TAB 11
|
||||
#define SETTINGS_TAB 12
|
||||
#define CREDITS_TAB 13
|
||||
#define LATEGAME_TAB 10
|
||||
#define DEVELOPER_TAB 11
|
||||
#define DEBUGLOG_TAB 12
|
||||
#define SETTINGS_TAB 13
|
||||
#define CREDITS_TAB 14
|
||||
|
||||
#define MAIN_PLAYERTAB 1
|
||||
#define INVENTORY_PLAYERTAB 2
|
||||
@@ -374,6 +375,14 @@ static inline void MainTabs()
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
if (Globals::bLateGame.load() && ImGui::BeginTabItem("Lategame"))
|
||||
{
|
||||
Tab = LATEGAME_TAB;
|
||||
PlayerTab = -1;
|
||||
bInformationTab = false;
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (bannedStream.is_open() && ImGui::BeginTabItem("Unban")) // skunked
|
||||
{
|
||||
@@ -769,8 +778,43 @@ static inline void MainUI()
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"startshrinksafezone", nullptr);
|
||||
SafeZoneIndicator->SkipShrinkSafeZone();
|
||||
|
||||
Sleep(1000);
|
||||
bool bBreak = false;
|
||||
int a = 0;
|
||||
|
||||
while (!bBreak)
|
||||
{
|
||||
for (int z = 0; z < ClientConnections.Num(); z++)
|
||||
{
|
||||
auto ClientConnection = ClientConnections.at(z);
|
||||
auto FortPC = Cast<AFortPlayerController>(ClientConnection->GetPlayerController());
|
||||
|
||||
if (!FortPC)
|
||||
continue;
|
||||
|
||||
if (FortPC->GetMyFortPawn())
|
||||
{
|
||||
bBreak = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (++a >= 5)
|
||||
bBreak = true;
|
||||
|
||||
Sleep(1000);
|
||||
}
|
||||
|
||||
SafeZoneIndicator->SkipShrinkSafeZone();
|
||||
|
||||
if (Engine_Version >= 424)
|
||||
{
|
||||
Sleep(1000);
|
||||
SafeZoneIndicator->SkipShrinkSafeZone();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_WARN(LogDev, "Invalid Indicator!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1088,6 +1132,9 @@ static inline void MainUI()
|
||||
LOG_WARN(LogUI, "Invalid Item Definition!");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Tab == LATEGAME_TAB)
|
||||
{
|
||||
|
||||
}
|
||||
else if (Tab == DEVELOPER_TAB)
|
||||
|
||||
2
Project Reboot 3.0/objectviewer.h
Normal file
2
Project Reboot 3.0/objectviewer.h
Normal file
@@ -0,0 +1,2 @@
|
||||
#pragma once
|
||||
|
||||
Reference in New Issue
Block a user