mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
a bit
fix cheat god, fix 1.7.2, 1.8, 2.4.2, and probably 2.5, add rocket event idk couldnt test, fix some crashes.
This commit is contained in:
@@ -234,14 +234,14 @@ bool AActor::IsOnlyRelevantToOwner()
|
|||||||
bool AActor::CanBeDamaged()
|
bool AActor::CanBeDamaged()
|
||||||
{
|
{
|
||||||
static auto bCanBeDamagedOffset = GetOffset("bCanBeDamaged");
|
static auto bCanBeDamagedOffset = GetOffset("bCanBeDamaged");
|
||||||
static auto bCanBeDamagedFieldMask = GetFieldMask(GetProperty("bOnlyRelevantToOwner"));
|
static auto bCanBeDamagedFieldMask = GetFieldMask(GetProperty("bCanBeDamaged"));
|
||||||
return ReadBitfieldValue(bCanBeDamagedOffset, bCanBeDamagedFieldMask);
|
return ReadBitfieldValue(bCanBeDamagedOffset, bCanBeDamagedFieldMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AActor::SetCanBeDamaged(bool NewValue)
|
void AActor::SetCanBeDamaged(bool NewValue)
|
||||||
{
|
{
|
||||||
static auto bCanBeDamagedOffset = GetOffset("bCanBeDamaged");
|
static auto bCanBeDamagedOffset = GetOffset("bCanBeDamaged");
|
||||||
static auto bCanBeDamagedFieldMask = GetFieldMask(GetProperty("bOnlyRelevantToOwner"));
|
static auto bCanBeDamagedFieldMask = GetFieldMask(GetProperty("bCanBeDamaged"));
|
||||||
SetBitfieldValue(bCanBeDamagedOffset, bCanBeDamagedFieldMask, NewValue);
|
SetBitfieldValue(bCanBeDamagedOffset, bCanBeDamagedFieldMask, NewValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,9 +53,9 @@ namespace FDebug
|
|||||||
TCHAR ErrorString[MAX_SPRINTF];
|
TCHAR ErrorString[MAX_SPRINTF];
|
||||||
FCString::Sprintf(ErrorString, TEXT("%s"), ANSI_TO_TCHAR(Expr));
|
FCString::Sprintf(ErrorString, TEXT("%s"), ANSI_TO_TCHAR(Expr));
|
||||||
GError->Logf(TEXT("Assertion failed: %s") FILE_LINE_DESC TEXT("\n%s\n"), ErrorString, ANSI_TO_TCHAR(File), Line, DescriptionString);
|
GError->Logf(TEXT("Assertion failed: %s") FILE_LINE_DESC TEXT("\n%s\n"), ErrorString, ANSI_TO_TCHAR(File), Line, DescriptionString);
|
||||||
*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define check(expr) { if(UNLIKELY(!(expr))) { FDebug::LogAssertFailedMessage( #expr, __FILE__, __LINE__, TEXT("") ); _DebugBreakAndPromptForRemote(); FDebug::AssertFailed( #expr, __FILE__, __LINE__ ); CA_ASSUME(false); } }
|
}
|
||||||
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// #define check(expr) { if(UNLIKELY(!(expr))) { FDebug::LogAssertFailedMessage( #expr, __FILE__, __LINE__, TEXT("") ); _DebugBreakAndPromptForRemote(); FDebug::AssertFailed( #expr, __FILE__, __LINE__ ); CA_ASSUME(false); } }
|
||||||
|
|||||||
@@ -910,7 +910,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
|||||||
if (!PlayerStateAthena)
|
if (!PlayerStateAthena)
|
||||||
return Athena_HandleStartingNewPlayerOriginal(GameMode, NewPlayerActor);
|
return Athena_HandleStartingNewPlayerOriginal(GameMode, NewPlayerActor);
|
||||||
|
|
||||||
if (Globals::bNoMCP)
|
if (Globals::bNoMCP || Engine_Version == 416)
|
||||||
{
|
{
|
||||||
static auto CharacterPartsOffset = PlayerStateAthena->GetOffset("CharacterParts", false);
|
static auto CharacterPartsOffset = PlayerStateAthena->GetOffset("CharacterParts", false);
|
||||||
static auto CustomCharacterPartsStruct = FindObject<UStruct>("/Script/FortniteGame.CustomCharacterParts");
|
static auto CustomCharacterPartsStruct = FindObject<UStruct>("/Script/FortniteGame.CustomCharacterParts");
|
||||||
@@ -931,9 +931,6 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
|||||||
Parts[(int)EFortCustomPartType::Head] = headPart;
|
Parts[(int)EFortCustomPartType::Head] = headPart;
|
||||||
Parts[(int)EFortCustomPartType::Body] = bodyPart;
|
Parts[(int)EFortCustomPartType::Body] = bodyPart;
|
||||||
|
|
||||||
// if (Fortnite_Version > 2.5)
|
|
||||||
Parts[(int)EFortCustomPartType::Backpack] = backpackPart;
|
|
||||||
|
|
||||||
static auto OnRep_CharacterPartsFn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerState.OnRep_CharacterParts");
|
static auto OnRep_CharacterPartsFn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerState.OnRep_CharacterParts");
|
||||||
PlayerStateAthena->ProcessEvent(OnRep_CharacterPartsFn);
|
PlayerStateAthena->ProcessEvent(OnRep_CharacterPartsFn);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -897,7 +897,9 @@ void AFortPlayerController::ServerAttemptInventoryDropHook(AFortPlayerController
|
|||||||
if (!ItemDefinition || !ItemDefinition->CanBeDropped())
|
if (!ItemDefinition || !ItemDefinition->CanBeDropped())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!ItemDefinition->ShouldIgnoreRespawningOnDrop() && ItemDefinition->GetDropBehavior() != EWorldItemDropBehavior::DestroyOnDrop)
|
static auto DropBehaviorOffset = ItemDefinition->GetOffset("DropBehavior", false);
|
||||||
|
|
||||||
|
if (!ItemDefinition->ShouldIgnoreRespawningOnDrop() && (DropBehaviorOffset != -1 ? ItemDefinition->GetDropBehavior() != EWorldItemDropBehavior::DestroyOnDrop : true))
|
||||||
{
|
{
|
||||||
auto Pickup = AFortPickup::SpawnPickup(ReplicatedEntry, Pawn->GetActorLocation(),
|
auto Pickup = AFortPickup::SpawnPickup(ReplicatedEntry, Pawn->GetActorLocation(),
|
||||||
EFortPickupSourceTypeFlag::Player, EFortPickupSpawnSource::Unset, Pawn);
|
EFortPickupSourceTypeFlag::Player, EFortPickupSpawnSource::Unset, Pawn);
|
||||||
@@ -923,6 +925,11 @@ void AFortPlayerController::ServerPlayEmoteItemHook(AFortPlayerController* Playe
|
|||||||
if (!EmoteAsset || !PlayerState || !Pawn)
|
if (!EmoteAsset || !PlayerState || !Pawn)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
auto AbilitySystemComponent = PlayerState->GetAbilitySystemComponent();
|
||||||
|
|
||||||
|
if (!AbilitySystemComponent)
|
||||||
|
return;
|
||||||
|
|
||||||
UObject* AbilityToUse = nullptr;
|
UObject* AbilityToUse = nullptr;
|
||||||
|
|
||||||
static auto AthenaSprayItemDefinitionClass = FindObject<UClass>("/Script/FortniteGame.AthenaSprayItemDefinition");
|
static auto AthenaSprayItemDefinitionClass = FindObject<UClass>("/Script/FortniteGame.AthenaSprayItemDefinition");
|
||||||
@@ -995,10 +1002,15 @@ void AFortPlayerController::ServerPlayEmoteItemHook(AFortPlayerController* Playe
|
|||||||
|
|
||||||
FGameplayAbilitySpec* Spec = MakeNewSpec((UClass*)AbilityToUse, EmoteAsset, true);
|
FGameplayAbilitySpec* Spec = MakeNewSpec((UClass*)AbilityToUse, EmoteAsset, true);
|
||||||
|
|
||||||
|
if (!Spec)
|
||||||
|
return;
|
||||||
|
|
||||||
static unsigned int* (*GiveAbilityAndActivateOnce)(UAbilitySystemComponent* ASC, int* outHandle, __int64 Spec, FGameplayEventData* TriggerEventData) = decltype(GiveAbilityAndActivateOnce)(Addresses::GiveAbilityAndActivateOnce); // EventData is only on ue500?
|
static unsigned int* (*GiveAbilityAndActivateOnce)(UAbilitySystemComponent* ASC, int* outHandle, __int64 Spec, FGameplayEventData* TriggerEventData) = decltype(GiveAbilityAndActivateOnce)(Addresses::GiveAbilityAndActivateOnce); // EventData is only on ue500?
|
||||||
|
|
||||||
if (GiveAbilityAndActivateOnce)
|
if (GiveAbilityAndActivateOnce)
|
||||||
GiveAbilityAndActivateOnce(PlayerState->GetAbilitySystemComponent(), &outHandle, __int64(Spec), nullptr);
|
{
|
||||||
|
GiveAbilityAndActivateOnce(AbilitySystemComponent, &outHandle, __int64(Spec), nullptr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 ToDeathCause(const FGameplayTagContainer& TagContainer, bool bWasDBNO = false, AFortPawn* Pawn = nullptr)
|
uint8 ToDeathCause(const FGameplayTagContainer& TagContainer, bool bWasDBNO = false, AFortPawn* Pawn = nullptr)
|
||||||
|
|||||||
@@ -8,13 +8,40 @@
|
|||||||
#include "AthenaMarkerComponent.h"
|
#include "AthenaMarkerComponent.h"
|
||||||
#include "FortVolume.h"
|
#include "FortVolume.h"
|
||||||
|
|
||||||
static void ApplyCID(AFortPlayerPawn* Pawn, UObject* CID, bool bUseServerChoosePart = false)
|
static bool ApplyCID(AFortPlayerPawn* Pawn, UObject* CID, bool bUseServerChoosePart = false)
|
||||||
{
|
{
|
||||||
if (!CID)
|
if (!CID)
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
if (!Pawn && bUseServerChoosePart)
|
auto PlayerController = Cast<AFortPlayerController>(Pawn->GetController());
|
||||||
return;
|
|
||||||
|
if (!PlayerController)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* auto PCCosmeticLoadout = PlayerController->GetCosmeticLoadout();
|
||||||
|
|
||||||
|
if (!PCCosmeticLoadout)
|
||||||
|
{
|
||||||
|
LOG_INFO(LogCosmetics, "PCCosmeticLoadout is not set! Will not be able to apply skin.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto PawnCosmeticLoadout = PlayerController->GetCosmeticLoadout();
|
||||||
|
|
||||||
|
if (!PawnCosmeticLoadout)
|
||||||
|
{
|
||||||
|
LOG_INFO(LogCosmetics, "PawnCosmeticLoadout is not set! Will not be able to apply skin.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
PCCosmeticLoadout->GetCharacter() = CID;
|
||||||
|
PawnCosmeticLoadout->GetCharacter() = CID;
|
||||||
|
PlayerController->ApplyCosmeticLoadout(); // would cause recursive
|
||||||
|
|
||||||
|
return true; */
|
||||||
|
|
||||||
|
if (Engine_Version == 416)
|
||||||
|
return false;
|
||||||
|
|
||||||
static auto HeroDefinitionOffset = CID->GetOffset("HeroDefinition");
|
static auto HeroDefinitionOffset = CID->GetOffset("HeroDefinition");
|
||||||
auto HeroDefinition = CID->Get(HeroDefinitionOffset);
|
auto HeroDefinition = CID->Get(HeroDefinitionOffset);
|
||||||
|
|||||||
@@ -3,6 +3,16 @@
|
|||||||
#include "FortPlayerController.h"
|
#include "FortPlayerController.h"
|
||||||
#include "FortGadgetItemDefinition.h"
|
#include "FortGadgetItemDefinition.h"
|
||||||
|
|
||||||
|
FFortAthenaLoadout* AFortPlayerPawn::GetCosmeticLoadout()
|
||||||
|
{
|
||||||
|
static auto CosmeticLoadoutOffset = GetOffset("CosmeticLoadout");
|
||||||
|
|
||||||
|
if (CosmeticLoadoutOffset == -1)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
return GetPtr<FFortAthenaLoadout>(CosmeticLoadoutOffset);
|
||||||
|
}
|
||||||
|
|
||||||
void AFortPlayerPawn::ServerChoosePart(EFortCustomPartType Part, UObject* ChosenCharacterPart)
|
void AFortPlayerPawn::ServerChoosePart(EFortCustomPartType Part, UObject* ChosenCharacterPart)
|
||||||
{
|
{
|
||||||
static auto fn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerPawn.ServerChoosePart");
|
static auto fn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerPawn.ServerChoosePart");
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public:
|
|||||||
static inline AActor* (*ServerOnExitVehicleOriginal)(AFortPlayerPawn* Pawn, ETryExitVehicleBehavior ExitForceBehavior); // actually returns AFortAthenaVehicle
|
static inline AActor* (*ServerOnExitVehicleOriginal)(AFortPlayerPawn* Pawn, ETryExitVehicleBehavior ExitForceBehavior); // actually returns AFortAthenaVehicle
|
||||||
static inline void (*StartGhostModeExitOriginal)(UObject* Context, FFrame* Stack, void* Ret);
|
static inline void (*StartGhostModeExitOriginal)(UObject* Context, FFrame* Stack, void* Ret);
|
||||||
|
|
||||||
|
struct FFortAthenaLoadout* GetCosmeticLoadout();
|
||||||
void ServerChoosePart(EFortCustomPartType Part, class UObject* ChosenCharacterPart);
|
void ServerChoosePart(EFortCustomPartType Part, class UObject* ChosenCharacterPart);
|
||||||
void ForceLaunchPlayerZipline(); // Thanks android
|
void ForceLaunchPlayerZipline(); // Thanks android
|
||||||
AActor* ServerOnExitVehicle(ETryExitVehicleBehavior ExitForceBehavior); // actually returns AFortAthenaVehicle
|
AActor* ServerOnExitVehicle(ETryExitVehicleBehavior ExitForceBehavior); // actually returns AFortAthenaVehicle
|
||||||
|
|||||||
15
Project Reboot 3.0/NetConnection.cpp
Normal file
15
Project Reboot 3.0/NetConnection.cpp
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#include "NetConnection.h"
|
||||||
|
|
||||||
|
bool UNetConnection::ClientHasInitializedLevelFor(const AActor* TestActor) const {
|
||||||
|
// return true;
|
||||||
|
static auto ClientHasInitializedLevelForAddr = Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B 5A 20 48 8B F1 4C 8B C3").Get();
|
||||||
|
|
||||||
|
if (!ClientHasInitializedLevelForAddr)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
static bool (*ClientHasInitializedLevelForOriginal)(const UNetConnection * Connection, const AActor * TestActor)
|
||||||
|
= decltype(ClientHasInitializedLevelForOriginal)(ClientHasInitializedLevelForAddr);
|
||||||
|
// ^ This is virtual but it doesn't really matter
|
||||||
|
|
||||||
|
return ClientHasInitializedLevelForOriginal(this, TestActor);
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "Map.h"
|
#include "Map.h"
|
||||||
#include "WeakObjectPtrTemplates.h"
|
#include "WeakObjectPtrTemplates.h"
|
||||||
#include "ActorChannel.h"
|
#include "ActorChannel.h"
|
||||||
|
#include <memcury.h>
|
||||||
|
|
||||||
class UNetConnection : public UPlayer
|
class UNetConnection : public UPlayer
|
||||||
{
|
{
|
||||||
@@ -17,7 +18,7 @@ public:
|
|||||||
|
|
||||||
FName& GetClientWorldPackageName() const
|
FName& GetClientWorldPackageName() const
|
||||||
{
|
{
|
||||||
static auto ClientWorldPackageNameOffset = 0x337B8;
|
static auto ClientWorldPackageNameOffset = Offsets::ClientWorldPackageName;
|
||||||
return *(FName*)(__int64(this) + ClientWorldPackageNameOffset);
|
return *(FName*)(__int64(this) + ClientWorldPackageNameOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,11 +41,11 @@ public:
|
|||||||
return Get<double>(LastReceiveTimeOffset);
|
return Get<double>(LastReceiveTimeOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
TSet<FName>& GetClientVisibleLevelNames()
|
/* TSet<FName>& GetClientVisibleLevelNames()
|
||||||
{
|
{
|
||||||
static auto ClientVisibleLevelNamesOffset = 0x336C8;
|
static auto ClientVisibleLevelNamesOffset = 0x336C8;
|
||||||
return *(TSet<FName>*)(__int64(this) + ClientVisibleLevelNamesOffset);
|
return *(TSet<FName>*)(__int64(this) + ClientVisibleLevelNamesOffset);
|
||||||
}
|
} */
|
||||||
|
|
||||||
class UNetDriver*& GetDriver()
|
class UNetDriver*& GetDriver()
|
||||||
{
|
{
|
||||||
@@ -70,9 +71,5 @@ public:
|
|||||||
return Get<TArray<AActor*>>(SentTemporariesOffset);
|
return Get<TArray<AActor*>>(SentTemporariesOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ClientHasInitializedLevelFor(const AActor* TestActor) const
|
bool ClientHasInitializedLevelFor(const AActor* TestActor) const;
|
||||||
{
|
|
||||||
bool (*ClientHasInitializedLevelForOriginal)(const UNetConnection* Connection, const AActor* TestActor) = decltype(ClientHasInitializedLevelForOriginal)(this->VFTable[0x300 / 8]);
|
|
||||||
return ClientHasInitializedLevelForOriginal(this, TestActor);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "GameplayStatics.h"
|
#include "GameplayStatics.h"
|
||||||
#include "KismetMathLibrary.h"
|
#include "KismetMathLibrary.h"
|
||||||
#include <random>
|
#include <random>
|
||||||
|
#include "AssertionMacros.h"
|
||||||
|
|
||||||
FNetworkObjectList& UNetDriver::GetNetworkObjectList()
|
FNetworkObjectList& UNetDriver::GetNetworkObjectList()
|
||||||
{
|
{
|
||||||
@@ -322,11 +323,11 @@ static FNetViewer ConstructNetViewer(UNetConnection* NetConnection)
|
|||||||
static auto ControlRotationOffset = ViewingController->GetOffset("ControlRotation");
|
static auto ControlRotationOffset = ViewingController->GetOffset("ControlRotation");
|
||||||
FRotator ViewRotation = ViewingController->Get<FRotator>(ControlRotationOffset); // hmmmm // ViewingController->GetControlRotation();
|
FRotator ViewRotation = ViewingController->Get<FRotator>(ControlRotationOffset); // hmmmm // ViewingController->GetControlRotation();
|
||||||
// AFortPlayerControllerAthena::GetPlayerViewPointHook(Cast<AFortPlayerControllerAthena>(ViewingController, false), newViewer.ViewLocation, ViewRotation);
|
// AFortPlayerControllerAthena::GetPlayerViewPointHook(Cast<AFortPlayerControllerAthena>(ViewingController, false), newViewer.ViewLocation, ViewRotation);
|
||||||
// ViewingController->GetActorEyesViewPoint(&newViewer.ViewLocation, &ViewRotation); // HMMM
|
ViewingController->GetActorEyesViewPoint(&newViewer.ViewLocation, &ViewRotation); // HMMM
|
||||||
|
|
||||||
static auto GetActorEyesViewPointOffset = 0x5B0;
|
// static auto GetActorEyesViewPointOffset = 0x5B0;
|
||||||
void (*GetActorEyesViewPointOriginal)(AController*, FVector * a2, FRotator * a3) = decltype(GetActorEyesViewPointOriginal)(ViewingController->VFTable[GetActorEyesViewPointOffset / 8]);
|
// void (*GetActorEyesViewPointOriginal)(AController*, FVector * a2, FRotator * a3) = decltype(GetActorEyesViewPointOriginal)(ViewingController->VFTable[GetActorEyesViewPointOffset / 8]);
|
||||||
GetActorEyesViewPointOriginal(ViewingController, &newViewer.ViewLocation, &ViewRotation);
|
// GetActorEyesViewPointOriginal(ViewingController, &newViewer.ViewLocation, &ViewRotation);
|
||||||
// AFortPlayerControllerAthena::GetPlayerViewPointHook((AFortPlayerControllerAthena*)ViewingController, newViewer.ViewLocation, ViewRotation);
|
// AFortPlayerControllerAthena::GetPlayerViewPointHook((AFortPlayerControllerAthena*)ViewingController, newViewer.ViewLocation, ViewRotation);
|
||||||
newViewer.ViewDir = ViewRotation.Vector();
|
newViewer.ViewDir = ViewRotation.Vector();
|
||||||
}
|
}
|
||||||
@@ -342,6 +343,15 @@ static FORCEINLINE bool IsActorDormant(FNetworkObjectInfo* ActorInfo, const TWea
|
|||||||
|
|
||||||
bool UNetDriver::IsLevelInitializedForActor(const AActor* InActor, const UNetConnection* InConnection) const
|
bool UNetDriver::IsLevelInitializedForActor(const AActor* InActor, const UNetConnection* InConnection) const
|
||||||
{
|
{
|
||||||
|
if (Fortnite_Version >= 2.42) // idk
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (!InActor || !InConnection)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// check(World == InActor->GetWorld());
|
||||||
|
|
||||||
|
// return true; // damn
|
||||||
const bool bCorrectWorld = (InConnection->GetClientWorldPackageName() == GetWorldPackage()->NamePrivate && InConnection->ClientHasInitializedLevelFor(InActor));
|
const bool bCorrectWorld = (InConnection->GetClientWorldPackageName() == GetWorldPackage()->NamePrivate && InConnection->ClientHasInitializedLevelFor(InActor));
|
||||||
const bool bIsConnectionPC = (InActor == InConnection->GetPlayerController());
|
const bool bIsConnectionPC = (InActor == InConnection->GetPlayerController());
|
||||||
return bCorrectWorld || bIsConnectionPC;
|
return bCorrectWorld || bIsConnectionPC;
|
||||||
@@ -376,7 +386,6 @@ int32 UNetDriver::ServerReplicateActors()
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::vector<FNetworkObjectInfo*> ConsiderList;
|
std::vector<FNetworkObjectInfo*> ConsiderList;
|
||||||
|
|
||||||
ConsiderList.reserve(GetNetworkObjectList().ActiveNetworkObjects.Num());
|
ConsiderList.reserve(GetNetworkObjectList().ActiveNetworkObjects.Num());
|
||||||
|
|
||||||
// std::cout << "ConsiderList.size(): " << GetNetworkObjectList(NetDriver).ActiveNetworkObjects.Num() << '\n';
|
// std::cout << "ConsiderList.size(): " << GetNetworkObjectList(NetDriver).ActiveNetworkObjects.Num() << '\n';
|
||||||
@@ -385,6 +394,8 @@ int32 UNetDriver::ServerReplicateActors()
|
|||||||
|
|
||||||
ServerReplicateActors_BuildConsiderList(ConsiderList, ServerTickTime);
|
ServerReplicateActors_BuildConsiderList(ConsiderList, ServerTickTime);
|
||||||
|
|
||||||
|
// LOG_INFO(LogReplication, "Considering {} actors.", ConsiderList.size());
|
||||||
|
|
||||||
for (int32 i = 0; i < this->GetClientConnections().Num(); i++)
|
for (int32 i = 0; i < this->GetClientConnections().Num(); i++)
|
||||||
{
|
{
|
||||||
UNetConnection* Connection = this->GetClientConnections().at(i);
|
UNetConnection* Connection = this->GetClientConnections().at(i);
|
||||||
@@ -434,9 +445,12 @@ int32 UNetDriver::ServerReplicateActors()
|
|||||||
std::vector<FNetViewer> ConnectionViewers;
|
std::vector<FNetViewer> ConnectionViewers;
|
||||||
ConnectionViewers.push_back(ConstructNetViewer(Connection));
|
ConnectionViewers.push_back(ConstructNetViewer(Connection));
|
||||||
|
|
||||||
|
const bool bLevelInitializedForActor = IsLevelInitializedForActor(Actor, Connection);
|
||||||
|
|
||||||
if (!Channel)
|
if (!Channel)
|
||||||
{
|
{
|
||||||
if (!IsLevelInitializedForActor(Actor, Connection))
|
// if (!IsLevelInitializedForActor(Actor, Connection))
|
||||||
|
if (!bLevelInitializedForActor)
|
||||||
{
|
{
|
||||||
// If the level this actor belongs to isn't loaded on client, don't bother sending
|
// If the level this actor belongs to isn't loaded on client, don't bother sending
|
||||||
continue;
|
continue;
|
||||||
@@ -473,6 +487,8 @@ int32 UNetDriver::ServerReplicateActors()
|
|||||||
|
|
||||||
if (!IsActorRelevantToConnection(Actor, ConnectionViewers))
|
if (!IsActorRelevantToConnection(Actor, ConnectionViewers))
|
||||||
{
|
{
|
||||||
|
// LOG_INFO(LogReplication, "Actor is not relevant!");
|
||||||
|
|
||||||
if (Channel)
|
if (Channel)
|
||||||
ActorChannelClose(Channel);
|
ActorChannelClose(Channel);
|
||||||
|
|
||||||
@@ -486,8 +502,6 @@ int32 UNetDriver::ServerReplicateActors()
|
|||||||
static __int64 (*ReplicateActor)(UActorChannel*) = decltype(ReplicateActor)(Addresses::ReplicateActor);
|
static __int64 (*ReplicateActor)(UActorChannel*) = decltype(ReplicateActor)(Addresses::ReplicateActor);
|
||||||
static __int64 (*SetChannelActor)(UActorChannel*, AActor*) = decltype(SetChannelActor)(Addresses::SetChannelActor);
|
static __int64 (*SetChannelActor)(UActorChannel*, AActor*) = decltype(SetChannelActor)(Addresses::SetChannelActor);
|
||||||
|
|
||||||
const bool bLevelInitializedForActor = IsLevelInitializedForActor(Actor, Connection);
|
|
||||||
|
|
||||||
if (!Channel)
|
if (!Channel)
|
||||||
{
|
{
|
||||||
if (Actor->IsA(APlayerController::StaticClass()) && Actor != Connection->GetPlayerController()) // isnetrelevantfor should handle this iirc
|
if (Actor->IsA(APlayerController::StaticClass()) && Actor != Connection->GetPlayerController()) // isnetrelevantfor should handle this iirc
|
||||||
@@ -513,6 +527,7 @@ int32 UNetDriver::ServerReplicateActors()
|
|||||||
{
|
{
|
||||||
if (ReplicateActor(Channel))
|
if (ReplicateActor(Channel))
|
||||||
{
|
{
|
||||||
|
// LOG_INFO(LogReplication, "Replicated Actor!");
|
||||||
auto TimeSeconds = UGameplayStatics::GetTimeSeconds(World);
|
auto TimeSeconds = UGameplayStatics::GetTimeSeconds(World);
|
||||||
const float MinOptimalDelta = 1.0f / Actor->GetNetUpdateFrequency();
|
const float MinOptimalDelta = 1.0f / Actor->GetNetUpdateFrequency();
|
||||||
const float MaxOptimalDelta = max(1.0f / Actor->GetMinNetUpdateFrequency(), MinOptimalDelta);
|
const float MaxOptimalDelta = max(1.0f / Actor->GetMinNetUpdateFrequency(), MinOptimalDelta);
|
||||||
|
|||||||
@@ -238,6 +238,7 @@
|
|||||||
<ClCompile Include="Level.cpp" />
|
<ClCompile Include="Level.cpp" />
|
||||||
<ClCompile Include="LevelActor.cpp" />
|
<ClCompile Include="LevelActor.cpp" />
|
||||||
<ClCompile Include="NameTypes.cpp" />
|
<ClCompile Include="NameTypes.cpp" />
|
||||||
|
<ClCompile Include="NetConnection.cpp" />
|
||||||
<ClCompile Include="NetConnection.h" />
|
<ClCompile Include="NetConnection.h" />
|
||||||
<ClCompile Include="NetDriver.cpp" />
|
<ClCompile Include="NetDriver.cpp" />
|
||||||
<ClCompile Include="NetworkObjectList.cpp" />
|
<ClCompile Include="NetworkObjectList.cpp" />
|
||||||
|
|||||||
@@ -251,6 +251,9 @@
|
|||||||
<ClCompile Include="calendar.h">
|
<ClCompile Include="calendar.h">
|
||||||
<Filter>Reboot\Public</Filter>
|
<Filter>Reboot\Public</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="NetConnection.cpp">
|
||||||
|
<Filter>Engine\Source\Runtime\Engine\Private</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="log.h" />
|
<ClInclude Include="log.h" />
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ void Addresses::SetupVersion()
|
|||||||
Fortnite_Version = 1.72;
|
Fortnite_Version = 1.72;
|
||||||
if (Fortnite_CL == 3724489)
|
if (Fortnite_CL == 3724489)
|
||||||
Fortnite_Version = 1.8;
|
Fortnite_Version = 1.8;
|
||||||
|
if (Fortnite_CL == 3757339)
|
||||||
|
Fortnite_Version = 1.9;
|
||||||
if (Fortnite_CL == 3870737)
|
if (Fortnite_CL == 3870737)
|
||||||
Fortnite_Version = 2.42;
|
Fortnite_Version = 2.42;
|
||||||
|
|
||||||
@@ -277,6 +279,9 @@ void Addresses::FindAll()
|
|||||||
LOG_INFO(LogDev, "Finding FreeArrayOfEntries");
|
LOG_INFO(LogDev, "Finding FreeArrayOfEntries");
|
||||||
Addresses::FreeArrayOfEntries = FindFreeArrayOfEntries();
|
Addresses::FreeArrayOfEntries = FindFreeArrayOfEntries();
|
||||||
|
|
||||||
|
LOG_INFO(LogDev, "Finding ApplyHomebaseEffectsOnPlayerSetup");
|
||||||
|
Addresses::FreeArrayOfEntries = FindApplyHomebaseEffectsOnPlayerSetup();
|
||||||
|
|
||||||
LOG_INFO(LogDev, "Finished finding!");
|
LOG_INFO(LogDev, "Finished finding!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -339,6 +344,7 @@ void Addresses::Print()
|
|||||||
LOG_INFO(LogDev, "EnterAircraft: 0x{:x}", EnterAircraft - Base);
|
LOG_INFO(LogDev, "EnterAircraft: 0x{:x}", EnterAircraft - Base);
|
||||||
LOG_INFO(LogDev, "SetTimer: 0x{:x}", SetTimer - Base);
|
LOG_INFO(LogDev, "SetTimer: 0x{:x}", SetTimer - Base);
|
||||||
LOG_INFO(LogDev, "PickupInitialize: 0x{:x}", PickupInitialize - Base);
|
LOG_INFO(LogDev, "PickupInitialize: 0x{:x}", PickupInitialize - Base);
|
||||||
|
LOG_INFO(LogDev, "ApplyHomebaseEffectsOnPlayerSetup: 0x{:x}", ApplyHomebaseEffectsOnPlayerSetup - Base);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Offsets::FindAll()
|
void Offsets::FindAll()
|
||||||
@@ -379,14 +385,26 @@ void Offsets::FindAll()
|
|||||||
else if (std::floor(Fortnite_Version) >= 21)
|
else if (std::floor(Fortnite_Version) >= 21)
|
||||||
Offsets::ServerReplicateActors = 0x67; // checked onb 22.30
|
Offsets::ServerReplicateActors = 0x67; // checked onb 22.30
|
||||||
|
|
||||||
if (Engine_Version == 416) // checked on 1.7.2 & 1.8
|
if (Engine_Version == 416) // checked on 1.7.2 & 1.8 & 1.9
|
||||||
{
|
{
|
||||||
Offsets::NetworkObjectList = 0x3F8;
|
Offsets::NetworkObjectList = 0x3F8;
|
||||||
Offsets::ReplicationFrame = 0x288;
|
Offsets::ReplicationFrame = 0x288;
|
||||||
}
|
}
|
||||||
if (Fortnite_Version == 2.42)
|
if (Fortnite_Version == 1.72)
|
||||||
{
|
{
|
||||||
Offsets::ReplicationFrame = 0x2C8;
|
Offsets::ClientWorldPackageName = 0x336A8;
|
||||||
|
}
|
||||||
|
if (Fortnite_Version == 1.8 || Fortnite_Version == 1.9)
|
||||||
|
{
|
||||||
|
Offsets::ClientWorldPackageName = 0x33788;
|
||||||
|
}
|
||||||
|
if (Fortnite_Version == 1.11)
|
||||||
|
{
|
||||||
|
Offsets::ClientWorldPackageName = 0x337B8;
|
||||||
|
}
|
||||||
|
if (Fortnite_Version == 2.42 || Fortnite_Version == 2.5)
|
||||||
|
{
|
||||||
|
Offsets::ClientWorldPackageName = 0x17F8;
|
||||||
}
|
}
|
||||||
if (Fortnite_Version == 2.5)
|
if (Fortnite_Version == 2.5)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ namespace Addresses
|
|||||||
extern inline uint64 PickupInitialize = 0;
|
extern inline uint64 PickupInitialize = 0;
|
||||||
extern inline uint64 FreeEntry = 0;
|
extern inline uint64 FreeEntry = 0;
|
||||||
extern inline uint64 FreeArrayOfEntries = 0;
|
extern inline uint64 FreeArrayOfEntries = 0;
|
||||||
|
extern inline uint64 ApplyHomebaseEffectsOnPlayerSetup = 0;
|
||||||
|
|
||||||
void SetupVersion(); // Finds Engine Version
|
void SetupVersion(); // Finds Engine Version
|
||||||
void FindAll();
|
void FindAll();
|
||||||
@@ -85,6 +86,7 @@ namespace Offsets
|
|||||||
extern inline uint64 ReplicationFrame = 0;
|
extern inline uint64 ReplicationFrame = 0;
|
||||||
extern inline uint64 IsNetRelevantFor = 0;
|
extern inline uint64 IsNetRelevantFor = 0;
|
||||||
extern inline uint64 NetworkObjectList = 0;
|
extern inline uint64 NetworkObjectList = 0;
|
||||||
|
extern inline uint64 ClientWorldPackageName = 0;
|
||||||
|
|
||||||
void FindAll();
|
void FindAll();
|
||||||
void Print();
|
void Print();
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
|||||||
Pawn->SetShield(Shield);
|
Pawn->SetShield(Shield);
|
||||||
SendMessageToConsole(PlayerController, L"Set shield!\n");
|
SendMessageToConsole(PlayerController, L"Set shield!\n");
|
||||||
}
|
}
|
||||||
/* else if (Command == "god")
|
else if (Command == "god")
|
||||||
{
|
{
|
||||||
auto Pawn = ReceivingController->GetMyFortPawn();
|
auto Pawn = ReceivingController->GetMyFortPawn();
|
||||||
|
|
||||||
@@ -330,7 +330,7 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
|||||||
|
|
||||||
Pawn->SetCanBeDamaged(!Pawn->CanBeDamaged());
|
Pawn->SetCanBeDamaged(!Pawn->CanBeDamaged());
|
||||||
SendMessageToConsole(PlayerController, std::wstring(L"God set to " + std::to_wstring(!(bool)Pawn->CanBeDamaged())).c_str());
|
SendMessageToConsole(PlayerController, std::wstring(L"God set to " + std::to_wstring(!(bool)Pawn->CanBeDamaged())).c_str());
|
||||||
} */
|
}
|
||||||
else if (Command == "applycid")
|
else if (Command == "applycid")
|
||||||
{
|
{
|
||||||
auto PlayerState = Cast<AFortPlayerState>(ReceivingController->GetPlayerState());
|
auto PlayerState = Cast<AFortPlayerState>(ReceivingController->GetPlayerState());
|
||||||
@@ -353,7 +353,14 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplyCID(Pawn, CIDDef);
|
LOG_INFO(LogDev, "Applying {}", CIDDef->GetFullName());
|
||||||
|
|
||||||
|
if (!ApplyCID(Pawn, CIDDef))
|
||||||
|
{
|
||||||
|
SendMessageToConsole(PlayerController, L"Failed while applying skin! Please check the server log.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SendMessageToConsole(PlayerController, L"Applied CID!");
|
SendMessageToConsole(PlayerController, L"Applied CID!");
|
||||||
}
|
}
|
||||||
else if (Command == "summon")
|
else if (Command == "summon")
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ DWORD WINAPI Main(LPVOID)
|
|||||||
|
|
||||||
// Globals::bAbilitiesEnabled = Engine_Version < 500;
|
// Globals::bAbilitiesEnabled = Engine_Version < 500;
|
||||||
|
|
||||||
if (Fortnite_Version == 1.11)
|
if (Engine_Version < 420)
|
||||||
{
|
{
|
||||||
auto ApplyHomebaseEffectsOnPlayerSetupAddr = Memcury::Scanner::FindPattern("40 55 53 57 41 54 41 56 41 57 48 8D 6C 24 ? 48 81 EC ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 45 00 4C 8B BD ? ? ? ? 49").Get();
|
auto ApplyHomebaseEffectsOnPlayerSetupAddr = Memcury::Scanner::FindPattern("40 55 53 57 41 54 41 56 41 57 48 8D 6C 24 ? 48 81 EC ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 45 00 4C 8B BD ? ? ? ? 49").Get();
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,32 @@ struct Event
|
|||||||
|
|
||||||
static inline std::vector<Event> Events =
|
static inline std::vector<Event> Events =
|
||||||
{
|
{
|
||||||
|
Event
|
||||||
|
(
|
||||||
|
"Rocket",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
0,
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
false,
|
||||||
|
// "/Buffet/Gameplay/Blueprints/BP_Buffet_Master_Scripting.BP_Buffet_Master_Scripting_C.startevent"
|
||||||
|
"/Game/Athena/Maps/Test/Events/BP_GeodeScripting.BP_GeodeScripting_C.LaunchSequence"
|
||||||
|
},
|
||||||
|
|
||||||
|
0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"/Game/Athena/Maps/Test/Events/BP_GeodeScripting.BP_GeodeScripting_C",
|
||||||
|
"/Game/Athena/Playlists/Playlist_DefaultSolo.Playlist_DefaultSolo",
|
||||||
|
4.5,
|
||||||
|
false
|
||||||
|
),
|
||||||
Event
|
Event
|
||||||
(
|
(
|
||||||
"Butterfly",
|
"Butterfly",
|
||||||
|
|||||||
@@ -404,6 +404,11 @@ static inline uint64 FindIsNetRelevantForOffset()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline uint64 FindApplyHomebaseEffectsOnPlayerSetup()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static inline uint64 FindActorChannelClose()
|
static inline uint64 FindActorChannelClose()
|
||||||
{
|
{
|
||||||
auto StringRef = Memcury::Scanner::FindStringRef(L"UActorChannel::Close: ChIndex: %d, Actor: %s");
|
auto StringRef = Memcury::Scanner::FindStringRef(L"UActorChannel::Close: ChIndex: %d, Actor: %s");
|
||||||
@@ -1283,7 +1288,10 @@ static inline uint64 FindGetNetMode()
|
|||||||
|
|
||||||
static inline uint64 FindApplyCharacterCustomization()
|
static inline uint64 FindApplyCharacterCustomization()
|
||||||
{
|
{
|
||||||
auto Addrr = Memcury::Scanner::FindStringRef(L"AFortPlayerState::ApplyCharacterCustomization - Failed initialization, using default parts. Player Controller: %s PlayerState: %s, HeroId: %s").Get();
|
auto Addrr = Memcury::Scanner::FindStringRef(L"AFortPlayerState::ApplyCharacterCustomization - Failed initialization, using default parts. Player Controller: %s PlayerState: %s, HeroId: %s", false).Get();
|
||||||
|
|
||||||
|
if (!Addrr)
|
||||||
|
return 0;
|
||||||
|
|
||||||
for (int i = 0; i < 7000; i++)
|
for (int i = 0; i < 7000; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ inline void InitLogger()
|
|||||||
MakeLogger("LogReplication");
|
MakeLogger("LogReplication");
|
||||||
MakeLogger("LogMutator");
|
MakeLogger("LogMutator");
|
||||||
MakeLogger("LogVehicles");
|
MakeLogger("LogVehicles");
|
||||||
|
MakeLogger("LogCosmetics");
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LOG_DEBUG(loggerName, ...) \
|
#define LOG_DEBUG(loggerName, ...) \
|
||||||
|
|||||||
Reference in New Issue
Block a user