mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
remove caaanactivateability
This commit is contained in:
@@ -125,7 +125,8 @@ public:
|
|||||||
if (Data && ArrayNum > 0 && sizeof(InElementType) > 0)
|
if (Data && ArrayNum > 0 && sizeof(InElementType) > 0)
|
||||||
{
|
{
|
||||||
// VirtualFree(Data, _msize(Data), MEM_RELEASE);
|
// VirtualFree(Data, _msize(Data), MEM_RELEASE);
|
||||||
VirtualFree(Data, sizeof(InElementType) * ArrayNum, MEM_RELEASE);
|
VirtualFree(Data, sizeof(InElementType) * ArrayNum, MEM_RELEASE); // ik this does nothing
|
||||||
|
// VirtualFree(Data, 0, MEM_RELEASE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayNum = 0;
|
ArrayNum = 0;
|
||||||
|
|||||||
@@ -260,6 +260,8 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
|||||||
LocalPlayers.Remove(0);
|
LocalPlayers.Remove(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LOG_INFO(LogDev, "ReadyToStartMatch!");
|
||||||
|
|
||||||
static int LastNum2 = 1;
|
static int LastNum2 = 1;
|
||||||
|
|
||||||
if (AmountOfRestarts != LastNum2)
|
if (AmountOfRestarts != LastNum2)
|
||||||
@@ -649,35 +651,20 @@ int AFortGameModeAthena::Athena_PickTeamHook(AFortGameModeAthena* GameMode, uint
|
|||||||
|
|
||||||
void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena* GameMode, AActor* NewPlayerActor)
|
void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena* GameMode, AActor* NewPlayerActor)
|
||||||
{
|
{
|
||||||
if (!NewPlayerActor)
|
if (NewPlayerActor == GetLocalPlayerController()) // we dont really need this but it also functions as a nullptr check usually
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LOG_INFO(LogPlayer, "HandleStartingNewPlayer!");
|
|
||||||
|
|
||||||
static bool bFirst = Engine_Version >= 424;
|
|
||||||
|
|
||||||
auto GameState = GameMode->GetGameStateAthena();
|
auto GameState = GameMode->GetGameStateAthena();
|
||||||
|
|
||||||
if (bFirst)
|
LOG_INFO(LogPlayer, "HandleStartingNewPlayer!");
|
||||||
|
|
||||||
|
if (Engine_Version < 427)
|
||||||
{
|
{
|
||||||
bFirst = false;
|
static int LastNum69 = 19451;
|
||||||
|
|
||||||
auto CurrentPlaylist = GameState->GetCurrentPlaylist();
|
if (LastNum69 != AmountOfRestarts)
|
||||||
|
|
||||||
// if (!CurrentPlaylist || !CurrentPlaylist->Get<bool>("bSkipWarmup"))
|
|
||||||
{
|
{
|
||||||
/* GameState->GetGamePhase() = EAthenaGamePhase::Warmup;
|
LastNum69 = AmountOfRestarts;
|
||||||
GameState->OnRep_GamePhase(); */
|
|
||||||
}
|
|
||||||
|
|
||||||
// GameState->OnRep_CurrentPlaylistInfo();
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool bSpawnedFloorLoot = Engine_Version >= 427;
|
|
||||||
|
|
||||||
if (!bSpawnedFloorLoot)
|
|
||||||
{
|
|
||||||
bSpawnedFloorLoot = true;
|
|
||||||
|
|
||||||
auto SpawnIsland_FloorLoot = FindObject<UClass>("/Game/Athena/Environments/Blueprints/Tiered_Athena_FloorLoot_Warmup.Tiered_Athena_FloorLoot_Warmup_C");
|
auto SpawnIsland_FloorLoot = FindObject<UClass>("/Game/Athena/Environments/Blueprints/Tiered_Athena_FloorLoot_Warmup.Tiered_Athena_FloorLoot_Warmup_C");
|
||||||
auto BRIsland_FloorLoot = FindObject<UClass>("/Game/Athena/Environments/Blueprints/Tiered_Athena_FloorLoot_01.Tiered_Athena_FloorLoot_01_C");
|
auto BRIsland_FloorLoot = FindObject<UClass>("/Game/Athena/Environments/Blueprints/Tiered_Athena_FloorLoot_01.Tiered_Athena_FloorLoot_01_C");
|
||||||
@@ -750,6 +737,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
|||||||
CurrentActor->K2_DestroyActor();
|
CurrentActor->K2_DestroyActor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LOG_INFO(LogDev, "Spawned loot!");
|
LOG_INFO(LogDev, "Spawned loot!");
|
||||||
|
|
||||||
|
|||||||
9
Project Reboot 3.0/GameMode.cpp
Normal file
9
Project Reboot 3.0/GameMode.cpp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#include "GameMode.h"
|
||||||
|
|
||||||
|
#include "reboot.h"
|
||||||
|
|
||||||
|
void AGameMode::RestartGame()
|
||||||
|
{
|
||||||
|
static auto fn = FindObject<UFunction>("/Script/Engine.GameMode.RestartGame");
|
||||||
|
this->ProcessEvent(fn);
|
||||||
|
}
|
||||||
@@ -6,6 +6,8 @@ class AGameMode : public AGameModeBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
void RestartGame();
|
||||||
|
|
||||||
class AGameState*& GetGameState()
|
class AGameState*& GetGameState()
|
||||||
{
|
{
|
||||||
static auto GameStateOffset = this->GetOffset("GameState");
|
static auto GameStateOffset = this->GetOffset("GameState");
|
||||||
|
|||||||
@@ -44,6 +44,36 @@ UObject* UGameplayStatics::SpawnObject(UClass* ObjectClass, UObject* Outer)
|
|||||||
return UGameplayStatics_SpawnObject_Params.ReturnValue;
|
return UGameplayStatics_SpawnObject_Params.ReturnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* void UGameplayStatics::OpenLevel(UObject* WorldContextObject, FName LevelName, bool bAbsolute, const FString& Options)
|
||||||
|
{
|
||||||
|
static auto fn = FindObject<UFunction>("/Script/Engine.GameplayStatics.OpenLevel");
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
UObject* WorldContextObject; // (ConstParm, Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||||
|
FName LevelName; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||||
|
bool bAbsolute; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, AdvancedDisplay, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||||
|
FString Options; // (Parm, ZeroConstructor, AdvancedDisplay, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||||
|
} UGameplayStatics_OpenLevel_Params{WorldContextObject, LevelName, bAbsolute, Options};
|
||||||
|
|
||||||
|
static auto defaultObj = StaticClass();
|
||||||
|
defaultObj->ProcessEvent(fn, &UGameplayStatics_OpenLevel_Params);
|
||||||
|
} */
|
||||||
|
|
||||||
|
void UGameplayStatics::RemovePlayer(APlayerController* Player, bool bDestroyPawn)
|
||||||
|
{
|
||||||
|
static auto fn = FindObject<UFunction>("/Script/Engine.GameplayStatics.RemovePlayer");
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
APlayerController* Player; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||||
|
bool bDestroyPawn; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||||
|
} UGameplayStatics_RemovePlayer_Params{Player, bDestroyPawn};
|
||||||
|
|
||||||
|
static auto defaultObj = StaticClass();
|
||||||
|
defaultObj->ProcessEvent(fn, &UGameplayStatics_RemovePlayer_Params);
|
||||||
|
}
|
||||||
|
|
||||||
UClass* UGameplayStatics::StaticClass()
|
UClass* UGameplayStatics::StaticClass()
|
||||||
{
|
{
|
||||||
static auto Class = FindObject<UClass>(L"/Script/Engine.GameplayStatics");
|
static auto Class = FindObject<UClass>(L"/Script/Engine.GameplayStatics");
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ public:
|
|||||||
static TArray<AActor*> GetAllActorsOfClass(const UObject* WorldContextObject, UClass* ActorClass);
|
static TArray<AActor*> GetAllActorsOfClass(const UObject* WorldContextObject, UClass* ActorClass);
|
||||||
static float GetTimeSeconds(UObject* WorldContextObject);
|
static float GetTimeSeconds(UObject* WorldContextObject);
|
||||||
static UObject* SpawnObject(UClass* ObjectClass, UObject* Outer);
|
static UObject* SpawnObject(UClass* ObjectClass, UObject* Outer);
|
||||||
|
// static void OpenLevel(UObject* WorldContextObject, FName LevelName, bool bAbsolute, const FString& Options);
|
||||||
|
static void RemovePlayer(class APlayerController* Player, bool bDestroyPawn);
|
||||||
|
|
||||||
static UClass* StaticClass();
|
static UClass* StaticClass();
|
||||||
};
|
};
|
||||||
@@ -201,6 +201,7 @@
|
|||||||
<ClCompile Include="FortPlaysetItemDefinition.cpp" />
|
<ClCompile Include="FortPlaysetItemDefinition.cpp" />
|
||||||
<ClCompile Include="FortWeapon.cpp" />
|
<ClCompile Include="FortWeapon.cpp" />
|
||||||
<ClCompile Include="FortWeaponItemDefinition.cpp" />
|
<ClCompile Include="FortWeaponItemDefinition.cpp" />
|
||||||
|
<ClCompile Include="GameMode.cpp" />
|
||||||
<ClCompile Include="GameModeBase.cpp" />
|
<ClCompile Include="GameModeBase.cpp" />
|
||||||
<ClCompile Include="GameplayStatics.cpp" />
|
<ClCompile Include="GameplayStatics.cpp" />
|
||||||
<ClCompile Include="GameState.cpp" />
|
<ClCompile Include="GameState.cpp" />
|
||||||
|
|||||||
@@ -161,6 +161,9 @@
|
|||||||
<ClCompile Include="InventoryManagementLibrary.cpp">
|
<ClCompile Include="InventoryManagementLibrary.cpp">
|
||||||
<Filter>FortniteGame\Source\FortniteGame\Private</Filter>
|
<Filter>FortniteGame\Source\FortniteGame\Private</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="GameMode.cpp">
|
||||||
|
<Filter>Engine\Source\Runtime\Engine\Private</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="log.h" />
|
<ClInclude Include="log.h" />
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <locale>
|
#include <locale>
|
||||||
|
|
||||||
#include "Array.h"
|
#include "Array.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
class FString
|
class FString
|
||||||
{
|
{
|
||||||
@@ -44,4 +45,14 @@ public:
|
|||||||
{
|
{
|
||||||
Set(str);
|
Set(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~FString()
|
||||||
|
{
|
||||||
|
if (Data.Data)
|
||||||
|
{
|
||||||
|
// LOG_INFO(LogDev, "Deconstructing FString!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Free();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
@@ -154,12 +154,19 @@ DWORD WINAPI Main(LPVOID)
|
|||||||
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3DED158), (PVOID)ReturnTrueHook, nullptr);
|
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3DED158), (PVOID)ReturnTrueHook, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (true)
|
||||||
|
{
|
||||||
auto& LocalPlayers = GetLocalPlayers();
|
auto& LocalPlayers = GetLocalPlayers();
|
||||||
|
|
||||||
if (LocalPlayers.Num() && LocalPlayers.Data)
|
if (LocalPlayers.Num() && LocalPlayers.Data)
|
||||||
{
|
{
|
||||||
LocalPlayers.Remove(0);
|
LocalPlayers.Remove(0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (false)
|
||||||
|
{
|
||||||
|
UGameplayStatics::RemovePlayer((APlayerController*)GetLocalPlayerController(), true);
|
||||||
|
}
|
||||||
|
|
||||||
for (auto func : Addresses::GetFunctionsToNull())
|
for (auto func : Addresses::GetFunctionsToNull())
|
||||||
{
|
{
|
||||||
@@ -377,7 +384,7 @@ DWORD WINAPI Main(LPVOID)
|
|||||||
Hooking::MinHook::Hook((PVOID)Addresses::TickFlush, (PVOID)UNetDriver::TickFlushHook, (PVOID*)&UNetDriver::TickFlushOriginal);
|
Hooking::MinHook::Hook((PVOID)Addresses::TickFlush, (PVOID)UNetDriver::TickFlushHook, (PVOID*)&UNetDriver::TickFlushOriginal);
|
||||||
// Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x1A001D0), GetServerDeltaTimeFromObjectHook);
|
// Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x1A001D0), GetServerDeltaTimeFromObjectHook);
|
||||||
|
|
||||||
// if (/* Engine_Version >= 420 && */ Engine_Version < 427)
|
// if (Engine_Version < 427)
|
||||||
{
|
{
|
||||||
Hooking::MinHook::Hook((PVOID)Addresses::OnDamageServer, (PVOID)ABuildingActor::OnDamageServerHook, (PVOID*)&ABuildingActor::OnDamageServerOriginal);
|
Hooking::MinHook::Hook((PVOID)Addresses::OnDamageServer, (PVOID)ABuildingActor::OnDamageServerHook, (PVOID*)&ABuildingActor::OnDamageServerOriginal);
|
||||||
}
|
}
|
||||||
@@ -387,7 +394,7 @@ DWORD WINAPI Main(LPVOID)
|
|||||||
Hooking::MinHook::Hook((PVOID)Addresses::PickTeam, (PVOID)AFortGameModeAthena::Athena_PickTeamHook);
|
Hooking::MinHook::Hook((PVOID)Addresses::PickTeam, (PVOID)AFortGameModeAthena::Athena_PickTeamHook);
|
||||||
// Hooking::MinHook::Hook((PVOID)Addresses::SetZoneToIndex, (PVOID)AFortGameModeAthena::SetZoneToIndexHook, (PVOID*)&AFortGameModeAthena::SetZoneToIndexOriginal);
|
// Hooking::MinHook::Hook((PVOID)Addresses::SetZoneToIndex, (PVOID)AFortGameModeAthena::SetZoneToIndexHook, (PVOID*)&AFortGameModeAthena::SetZoneToIndexOriginal);
|
||||||
Hooking::MinHook::Hook((PVOID)Addresses::CompletePickupAnimation, (PVOID)AFortPickup::CompletePickupAnimationHook, (PVOID*)&AFortPickup::CompletePickupAnimationOriginal);
|
Hooking::MinHook::Hook((PVOID)Addresses::CompletePickupAnimation, (PVOID)AFortPickup::CompletePickupAnimationHook, (PVOID*)&AFortPickup::CompletePickupAnimationOriginal);
|
||||||
Hooking::MinHook::Hook((PVOID)Addresses::CanActivateAbility, ReturnTrueHook); // ahhh wtf
|
// Hooking::MinHook::Hook((PVOID)Addresses::CanActivateAbility, ReturnTrueHook); // ahhh wtf
|
||||||
// Hooking::MinHook::Hook((PVOID)FindFunctionCall(L"ServerRemoveInventoryItem"), UFortInventoryInterface::RemoveInventoryItemHook);
|
// Hooking::MinHook::Hook((PVOID)FindFunctionCall(L"ServerRemoveInventoryItem"), UFortInventoryInterface::RemoveInventoryItemHook);
|
||||||
|
|
||||||
if (Fortnite_Version >= 13)
|
if (Fortnite_Version >= 13)
|
||||||
@@ -474,6 +481,34 @@ DWORD WINAPI Main(LPVOID)
|
|||||||
Globals::bLogProcessEvent = !Globals::bLogProcessEvent;
|
Globals::bLogProcessEvent = !Globals::bLogProcessEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* else if (GetAsyncKeyState(VK_F10) & 1)
|
||||||
|
{
|
||||||
|
FString LevelA = Engine_Version < 424
|
||||||
|
? L"open Athena_Terrain" : Engine_Version >= 500 ? Engine_Version >= 501
|
||||||
|
? L"open Asteria_Terrain"
|
||||||
|
: Globals::bCreative ? L"open Creative_NoApollo_Terrain"
|
||||||
|
: L"open Artemis_Terrain"
|
||||||
|
: Globals::bCreative ? L"open Creative_NoApollo_Terrain"
|
||||||
|
: L"open Apollo_Terrain";
|
||||||
|
|
||||||
|
static auto BeaconClass = FindObject<UClass>(L"/Script/FortniteGame.FortOnlineBeaconHost");
|
||||||
|
auto AllFortBeacons = UGameplayStatics::GetAllActorsOfClass(GetWorld(), BeaconClass);
|
||||||
|
|
||||||
|
for (int i = 0; i < AllFortBeacons.Num(); i++)
|
||||||
|
{
|
||||||
|
AllFortBeacons.at(i)->K2_DestroyActor();
|
||||||
|
}
|
||||||
|
|
||||||
|
AllFortBeacons.Free();
|
||||||
|
|
||||||
|
LOG_INFO(LogDev, "Switching!");
|
||||||
|
((AGameMode*)GetWorld()->GetGameMode())->RestartGame();
|
||||||
|
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), LevelA, nullptr);
|
||||||
|
// UGameplayStatics::OpenLevel(GetWorld(), UKismetStringLibrary::Conv_StringToName(LevelA), true, FString());
|
||||||
|
LOG_INFO(LogDev, "Restarting!");
|
||||||
|
AmountOfRestarts++;
|
||||||
|
} */
|
||||||
|
|
||||||
Sleep(1000 / 30);
|
Sleep(1000 / 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,12 @@ inline void InitLogger()
|
|||||||
|
|
||||||
FILE* stream = nullptr;
|
FILE* stream = nullptr;
|
||||||
|
|
||||||
|
// if (false)
|
||||||
|
{
|
||||||
freopen_s(&stream, "in.txt", "r", stdin);
|
freopen_s(&stream, "in.txt", "r", stdin);
|
||||||
freopen_s(&stream, "out.txt", "w+", stdout);
|
freopen_s(&stream, "out.txt", "w+", stdout);
|
||||||
freopen_s(&stream, "err.txt", "w", stderr);
|
freopen_s(&stream, "err.txt", "w", stderr);
|
||||||
|
}
|
||||||
|
|
||||||
SetConsoleTitleA("Project Reboot 3.0");
|
SetConsoleTitleA("Project Reboot 3.0");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user