mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
Fixed GIsClient (BIG)
This commit is contained in:
@@ -547,7 +547,16 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
||||
ShowFoundation(FindObject<AActor>(L"/Game/Athena/Apollo/Maps/Apollo_POI_Foundations.Apollo_POI_Foundations.PersistentLevel.Lobby_Foundation3")); // Aircraft Carrier
|
||||
}
|
||||
|
||||
auto TheBlock = FindObject<AActor>(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.SLAB_2"); // SLAB_3 is blank
|
||||
AActor* TheBlock = nullptr;
|
||||
|
||||
if (Fortnite_Version > 10) // todo only checked on 10.40
|
||||
{
|
||||
TheBlock = FindObject<AActor>(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.SLAB_4");
|
||||
}
|
||||
else
|
||||
{
|
||||
TheBlock = FindObject<AActor>(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.SLAB_2"); // SLAB_3 is blank
|
||||
}
|
||||
|
||||
if (TheBlock)
|
||||
ShowFoundation(TheBlock);
|
||||
|
||||
@@ -429,9 +429,6 @@ void AFortPlayerController::ServerAttemptInteractHook(UObject* Context, FFrame*
|
||||
static auto ReceivingActorOffset = FindOffsetStruct(StructName, "ReceivingActor");
|
||||
auto ReceivingActor = *(AActor**)(__int64(Params) + ReceivingActorOffset);
|
||||
|
||||
static auto InteractionBeingAttemptedOffset = FindOffsetStruct(StructName, "InteractionBeingAttempted");
|
||||
auto InteractionBeingAttempted = *(EInteractionBeingAttempted*)(__int64(Params) + InteractionBeingAttemptedOffset);
|
||||
|
||||
// LOG_INFO(LogInteraction, "ReceivingActor: {}", __int64(ReceivingActor));
|
||||
|
||||
if (!ReceivingActor)
|
||||
@@ -530,6 +527,9 @@ void AFortPlayerController::ServerAttemptInteractHook(UObject* Context, FFrame*
|
||||
{
|
||||
if (Engine_Version >= 424 && Fortnite_Version < 15 && ReceivingActor->GetFullName().contains("Wumba"))
|
||||
{
|
||||
static auto InteractionBeingAttemptedOffset = FindOffsetStruct(StructName, "InteractionBeingAttempted");
|
||||
auto InteractionBeingAttempted = *(EInteractionBeingAttempted*)(__int64(Params) + InteractionBeingAttemptedOffset);
|
||||
|
||||
bool bIsSidegrading = InteractionBeingAttempted == EInteractionBeingAttempted::SecondInteraction ? true : false;
|
||||
|
||||
LOG_INFO(LogDev, "bIsSidegrading: {}", (bool)bIsSidegrading);
|
||||
|
||||
@@ -307,7 +307,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="log.h" />
|
||||
<ClInclude Include="finder.h" />
|
||||
<ClInclude Include="Array.h">
|
||||
<Filter>Engine\Source\Runtime\Core\Public\Containers</Filter>
|
||||
</ClInclude>
|
||||
@@ -960,6 +959,9 @@
|
||||
<ClInclude Include="FortPlaylistAthena.h">
|
||||
<Filter>FortniteGame\Source\FortniteGame\Public</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="finder.h">
|
||||
<Filter>Reboot\Public</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Engine">
|
||||
|
||||
@@ -44,6 +44,90 @@ uint64 FindStartAircraftPhase()
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 FindGIsClient()
|
||||
{
|
||||
/* if (Fortnite_Version >= 20)
|
||||
return 0; */
|
||||
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering");
|
||||
|
||||
std::vector<std::vector<uint8_t>> BytesArray = {
|
||||
// {0x88, 0x05}, // Idk what version this is
|
||||
{0xC6, 0x05}, // mov cs X // Checked on 1.11, 12.41
|
||||
{0x88, 0x1D}, // mov cs bl // Checked on 17.50, 19.10
|
||||
// {0x44, 0x88} // IDK WHAT VERSION This for but it scuffs older builds
|
||||
};
|
||||
|
||||
int Skip = Engine_Version <= 420 ? 1 : 2; // Skip GIsServer and some variable i forgot
|
||||
|
||||
uint64 Addy;
|
||||
|
||||
for (int i = 0; i < 50; i++) // we should subtract from skip if go up
|
||||
{
|
||||
auto CurrentByte = *(Memcury::ASM::MNEMONIC*)(Addr.Get() - i);
|
||||
|
||||
// if (bPrint)
|
||||
// std::cout << "CurrentByte: " << std::hex << (int)CurrentByte << '\n';
|
||||
|
||||
bool ShouldBreak = false;
|
||||
|
||||
// LOG_INFO(LogDev, "[{}] Byte: 0x{:x}", i, (int)CurrentByte);
|
||||
|
||||
for (auto& Bytes : BytesArray)
|
||||
{
|
||||
if (CurrentByte == Bytes[0])
|
||||
{
|
||||
bool Found = true;
|
||||
for (int j = 1; j < Bytes.size(); j++)
|
||||
{
|
||||
if (*(Memcury::ASM::MNEMONIC*)(Addr.Get() - i + j) != Bytes[j])
|
||||
{
|
||||
Found = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Found)
|
||||
{
|
||||
int Relative = Bytes[0] == 0x44 ? 3 : 2;
|
||||
auto current = Memcury::Scanner(Addr.Get() - i);
|
||||
// LOG_INFO(LogDev, "[{}] No Rel 0x{:x} Rel: 0x{:x}", Skip, current.Get() - __int64(GetModuleHandleW(0)), Memcury::Scanner(Addr.Get() - i).RelativeOffset(Relative).Get() - __int64(GetModuleHandleW(0)));
|
||||
|
||||
if (Skip > 0)
|
||||
{
|
||||
Skip--;
|
||||
continue;
|
||||
}
|
||||
|
||||
Addy = Bytes[0] == 0xC6
|
||||
? current.RelativeOffset(Relative, 1).Get() // If mov cs then we add 1 because the last byte is the value and makes whole instructions 1 byte longer
|
||||
: current.RelativeOffset(Relative).Get();
|
||||
ShouldBreak = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ShouldBreak)
|
||||
break;
|
||||
|
||||
// std::cout << std::format("CurrentByte: 0x{:x}\n", (uint8_t)CurrentByte);
|
||||
}
|
||||
|
||||
// LOG_INFO(LogDev, "Addy: 0x{:x}", Addy - __int64(GetModuleHandleW(0)));
|
||||
|
||||
return Addy; // 0; // Memcury::Scanner(Addy3).RelativeOffset(2).Get();
|
||||
|
||||
/*
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering");
|
||||
int Skip = 1;
|
||||
auto Addy = FindBytes(Addr, { 0xC6, 0x05 }, 50, 0, true, Skip);
|
||||
Addy = Addy ? Addy : FindBytes(Addr, { 0x44, 0x88 }, 50, 0, true, Skip);
|
||||
Addy = Addy ? Addy : FindBytes(Addr, { 0x88, 0x1D }, 50, 0, true, Skip);
|
||||
|
||||
return Memcury::Scanner(Addy).RelativeOffset(2).Get();
|
||||
*/
|
||||
}
|
||||
|
||||
uint64 FindGetSessionInterface()
|
||||
{
|
||||
auto strRef = Memcury::Scanner::FindStringRef(L"OnDestroyReservedSessionComplete %s bSuccess: %d", true, 0, Fortnite_Version >= 19).Get();
|
||||
|
||||
@@ -1109,7 +1109,7 @@ static inline uint64 FindCollectGarbage()
|
||||
|
||||
static inline uint64 FindActorGetNetMode()
|
||||
{
|
||||
// return 0;
|
||||
return 0; // We *shouldnt* need to hook this now because I fixed FindGIsClient
|
||||
|
||||
if (Engine_Version == 500) // hah well this and 427 does like nothing cuz inline mostly
|
||||
{
|
||||
@@ -1463,81 +1463,7 @@ static inline uint64 FindMcpIsDedicatedServerOffset()
|
||||
return 0x60; // 1.7.2 & 1.11 & 4.1
|
||||
}
|
||||
|
||||
static inline uint64 FindGIsClient()
|
||||
{
|
||||
/* if (Fortnite_Version >= 20)
|
||||
return 0; */
|
||||
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering");
|
||||
|
||||
std::vector<std::vector<uint8_t>> BytesArray = { {0x88, 0x05}, {0xC6, 0x05}, {0x88, 0x1D}, {0x44, 0x88}};
|
||||
|
||||
int Skip = Engine_Version <= 420 ? 1 : 2;
|
||||
|
||||
uint64 Addy;
|
||||
|
||||
for (int i = 0; i < 50; i++) // we should subtract from skip if goup
|
||||
{
|
||||
auto CurrentByte = *(Memcury::ASM::MNEMONIC*)(Addr.Get() - i);
|
||||
|
||||
// if (bPrint)
|
||||
// std::cout << "CurrentByte: " << std::hex << (int)CurrentByte << '\n';
|
||||
|
||||
bool ShouldBreak = false;
|
||||
|
||||
// LOG_INFO(LogDev, "[{}] Byte: 0x{:x}", i, (int)CurrentByte);
|
||||
|
||||
for (auto& Bytes : BytesArray)
|
||||
{
|
||||
if (CurrentByte == Bytes[0])
|
||||
{
|
||||
bool Found = true;
|
||||
for (int j = 1; j < Bytes.size(); j++)
|
||||
{
|
||||
if (*(Memcury::ASM::MNEMONIC*)(Addr.Get() - i + j) != Bytes[j])
|
||||
{
|
||||
Found = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Found)
|
||||
{
|
||||
int Relative = Bytes[0] == 0x44 ? 3 : 2;
|
||||
// LOG_INFO(LogDev, "[{}] No Rel 0x{:x} Rel: 0x{:x}", Skip, Memcury::Scanner(Addr.Get() - i).Get() - __int64(GetModuleHandleW(0)), Memcury::Scanner(Addr.Get() - i).RelativeOffset(Relative).Get() - __int64(GetModuleHandleW(0)));
|
||||
|
||||
if (Skip > 0)
|
||||
{
|
||||
Skip--;
|
||||
continue;
|
||||
}
|
||||
|
||||
Addy = Memcury::Scanner(Addr.Get() - i).RelativeOffset(Relative).Get();
|
||||
ShouldBreak = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ShouldBreak)
|
||||
break;
|
||||
|
||||
// std::cout << std::format("CurrentByte: 0x{:x}\n", (uint8_t)CurrentByte);
|
||||
}
|
||||
|
||||
// LOG_INFO(LogDev, "Addy: 0x{:x}", Addy - __int64(GetModuleHandleW(0)));
|
||||
|
||||
return Addy; // 0; // Memcury::Scanner(Addy3).RelativeOffset(2).Get();
|
||||
|
||||
/*
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering");
|
||||
int Skip = 1;
|
||||
auto Addy = FindBytes(Addr, { 0xC6, 0x05 }, 50, 0, true, Skip);
|
||||
Addy = Addy ? Addy : FindBytes(Addr, { 0x44, 0x88 }, 50, 0, true, Skip);
|
||||
Addy = Addy ? Addy : FindBytes(Addr, { 0x88, 0x1D }, 50, 0, true, Skip);
|
||||
|
||||
return Memcury::Scanner(Addy).RelativeOffset(2).Get();
|
||||
*/
|
||||
}
|
||||
uint64 FindGIsClient(); // AHHH
|
||||
|
||||
static inline uint64 FindGetNetMode()
|
||||
{
|
||||
|
||||
@@ -110,6 +110,11 @@ static inline void SetIsLategame(bool Value)
|
||||
StartingShield = Value ? 100 : 0;
|
||||
}
|
||||
|
||||
static inline bool HasAnyCalendarModification()
|
||||
{
|
||||
return Calendar::HasSnowModification() || Calendar::HasNYE() || std::floor(Fortnite_Version) == 13;
|
||||
}
|
||||
|
||||
static inline void Restart() // todo move?
|
||||
{
|
||||
FString LevelA = Engine_Version < 424
|
||||
@@ -378,7 +383,7 @@ static inline void MainTabs()
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui::BeginTabItem("Calendar Events"))
|
||||
if (HasAnyCalendarModification() && ImGui::BeginTabItem("Calendar Events"))
|
||||
{
|
||||
Tab = CALENDAR_TAB;
|
||||
PlayerTab = -1;
|
||||
|
||||
8
vendor/memcury.h
vendored
8
vendor/memcury.h
vendored
@@ -512,9 +512,9 @@
|
||||
return _address != address._address;
|
||||
}
|
||||
|
||||
auto RelativeOffset(uint32_t offset) -> Address
|
||||
auto RelativeOffset(uint32_t offset, uint32_t off2 = 0) -> Address
|
||||
{
|
||||
_address = ((_address + offset + 4) + *(int32_t*)(_address + offset));
|
||||
_address = ((_address + offset + 4 + off2) + *(int32_t*)(_address + offset));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1010,7 +1010,7 @@
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto RelativeOffset(uint32_t offset) -> Scanner
|
||||
auto RelativeOffset(uint32_t offset, uint32_t off2 = 0) -> Scanner
|
||||
{
|
||||
if (!_address.Get())
|
||||
{
|
||||
@@ -1018,7 +1018,7 @@
|
||||
return *this;
|
||||
}
|
||||
|
||||
_address.RelativeOffset(offset);
|
||||
_address.RelativeOffset(offset, off2);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user