mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
a bit of stuff
fixed 11.00, maybe fixed random 19.10 crash, fixed dying crashing on >S7, moved getplaylisttouse to gamemodeathena.cpp so now it automatically applies event playlist
This commit is contained in:
@@ -39,6 +39,45 @@ enum class EDynamicFoundationType : uint8_t
|
||||
EDynamicFoundationType_MAX = 4
|
||||
};
|
||||
|
||||
|
||||
static UObject* GetPlaylistToUse()
|
||||
{
|
||||
auto Playlist = FindObject("/Game/Athena/Playlists/Playlist_DefaultSolo.Playlist_DefaultSolo");
|
||||
// Playlist = FindObject("/BlueCheese/Playlists/Playlist_ShowdownAlt_BlueCheese_Trios.Playlist_ShowdownAlt_BlueCheese_Trios");
|
||||
|
||||
if (Globals::bGoingToPlayEvent)
|
||||
{
|
||||
if (Fortnite_Version != 12.61)
|
||||
{
|
||||
auto EventPlaylist = GetEventPlaylist();
|
||||
|
||||
if (!EventPlaylist)
|
||||
{
|
||||
LOG_ERROR(LogPlaylist, "No event playlist! Turning off going to play event");
|
||||
Globals::bGoingToPlayEvent = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Playlist = EventPlaylist;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// SET OVERRIDE PLAYLIST DOWN HERE
|
||||
|
||||
// Playlist = FindObject("/Game/Athena/Playlists/Playground/Playlist_Playground.Playlist_Playground");
|
||||
|
||||
// Playlist = FindObject("/Game/Athena/Playlists/Carmine/Playlist_Carmine.Playlist_Carmine");
|
||||
|
||||
// Playlist = FindObject("/MoleGame/Playlists/Playlist_MoleGame.Playlist_MoleGame");
|
||||
// Playlist = FindObject("/Game/Athena/Playlists/DADBRO/Playlist_DADBRO_Squads_8.Playlist_DADBRO_Squads_8");
|
||||
|
||||
if (Globals::bCreative)
|
||||
Playlist = FindObject("/Game/Athena/Playlists/Creative/Playlist_PlaygroundV2.Playlist_PlaygroundV2");
|
||||
|
||||
return Playlist;
|
||||
}
|
||||
|
||||
void ShowFoundation(UObject* BuildingFoundation)
|
||||
{
|
||||
if (!BuildingFoundation)
|
||||
|
||||
@@ -177,7 +177,7 @@ void UFortKismetLibrary::CreateTossAmmoPickupForWeaponItemDefinitionAtLocationHo
|
||||
|
||||
// return CreateTossAmmoPickupForWeaponItemDefinitionAtLocationOriginal(Context, Stack, Ret);
|
||||
|
||||
int Count = 1;
|
||||
int Count = 1; // uh?
|
||||
|
||||
auto AmmoDefinition = WeaponItemDefinition->GetAmmoData();
|
||||
|
||||
|
||||
@@ -633,7 +633,7 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
||||
|
||||
auto/*&*/ Tags = MemberOffsets::FortPlayerPawn::CorrectTags == 0 ? FGameplayTagContainer()
|
||||
: DeadPawn->Get<FGameplayTagContainer>(MemberOffsets::FortPlayerPawn::CorrectTags);
|
||||
// *(FGameplayTagContainer*)(__int64(DeathReport) + MemberOffsets::DeathReport::Tags);
|
||||
// *(FGameplayTagContainer*)(__int64(DeathReport) + MemberOffsets::DeathReport::Tags);
|
||||
|
||||
// LOG_INFO(LogDev, "Tags: {}", Tags.ToStringSimple(true));
|
||||
|
||||
@@ -645,18 +645,18 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
||||
*(uint8*)(__int64(DeathInfo) + MemberOffsets::DeathInfo::DeathCause) = DeathCause;
|
||||
*(AActor**)(__int64(DeathInfo) + MemberOffsets::DeathInfo::FinisherOrDowner) = KillerPlayerState ? KillerPlayerState : DeadPlayerState;
|
||||
|
||||
if (MemberOffsets::DeathInfo::DeathLocation != 0)
|
||||
if (MemberOffsets::DeathInfo::DeathLocation != -1)
|
||||
*(FVector*)(__int64(DeathInfo) + MemberOffsets::DeathInfo::DeathLocation) = DeathLocation;
|
||||
|
||||
if (MemberOffsets::DeathInfo::DeathTags != 0)
|
||||
if (MemberOffsets::DeathInfo::DeathTags != -1)
|
||||
*(FGameplayTagContainer*)(__int64(DeathInfo) + MemberOffsets::DeathInfo::DeathTags) = Tags;
|
||||
|
||||
if (MemberOffsets::DeathInfo::bInitialized != 0)
|
||||
if (MemberOffsets::DeathInfo::bInitialized != -1)
|
||||
*(bool*)(__int64(DeathInfo) + MemberOffsets::DeathInfo::bInitialized) = true;
|
||||
|
||||
if (DeathCause == FallDamageEnumValue)
|
||||
{
|
||||
if (MemberOffsets::FortPlayerPawnAthena::LastFallDistance != 0)
|
||||
if (MemberOffsets::FortPlayerPawnAthena::LastFallDistance != -1)
|
||||
*(float*)(__int64(DeathInfo) + MemberOffsets::DeathInfo::Distance) = DeadPawn->Get<float>(MemberOffsets::FortPlayerPawnAthena::LastFallDistance);
|
||||
}
|
||||
else
|
||||
@@ -664,23 +664,21 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
||||
*(float*)(__int64(DeathInfo) + MemberOffsets::DeathInfo::Distance) = KillerPawn ? KillerPawn->GetDistanceTo(DeadPawn) : 0;
|
||||
}
|
||||
|
||||
if (MemberOffsets::FortPlayerState::PawnDeathLocation != 0)
|
||||
if (MemberOffsets::FortPlayerState::PawnDeathLocation != -1)
|
||||
DeadPlayerState->Get<FVector>(MemberOffsets::FortPlayerState::PawnDeathLocation) = DeathLocation;
|
||||
|
||||
LOG_INFO(LogDev, "Calling OnRep_DeathInfo.");
|
||||
|
||||
static auto OnRep_DeathInfoFn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerStateAthena.OnRep_DeathInfo");
|
||||
|
||||
if (OnRep_DeathInfoFn)
|
||||
{
|
||||
DeadPlayerState->ProcessEvent(OnRep_DeathInfoFn);
|
||||
|
||||
LOG_INFO(LogDev, "Called OnRep_DeathInfo.");
|
||||
}
|
||||
|
||||
if (KillerPlayerState && KillerPlayerState != DeadPlayerState)
|
||||
{
|
||||
KillerPlayerState->Get<int>(MemberOffsets::FortPlayerStateAthena::KillScore)++;
|
||||
|
||||
if (MemberOffsets::FortPlayerStateAthena::TeamKillScore != 0)
|
||||
if (MemberOffsets::FortPlayerStateAthena::TeamKillScore != -1)
|
||||
KillerPlayerState->Get<int>(MemberOffsets::FortPlayerStateAthena::TeamKillScore)++;
|
||||
|
||||
KillerPlayerState->ClientReportKill(DeadPlayerState);
|
||||
@@ -712,7 +710,7 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
||||
{
|
||||
auto ItemInstance = ItemInstances.at(i);
|
||||
|
||||
LOG_INFO(LogDev, "[{}/{}] CurrentItemInstance {}", i, ItemInstances.Num(), __int64(ItemInstance));
|
||||
// LOG_INFO(LogDev, "[{}/{}] CurrentItemInstance {}", i, ItemInstances.Num(), __int64(ItemInstance));
|
||||
|
||||
if (!ItemInstance)
|
||||
continue;
|
||||
@@ -720,14 +718,14 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
||||
auto ItemEntry = ItemInstance->GetItemEntry();
|
||||
auto WorldItemDefinition = Cast<UFortWorldItemDefinition>(ItemEntry->GetItemDefinition());
|
||||
|
||||
LOG_INFO(LogDev, "[{}/{}] WorldItemDefinition {}", i, ItemInstances.Num(), WorldItemDefinition ? WorldItemDefinition->GetFullName() : "InvalidObject");
|
||||
// LOG_INFO(LogDev, "[{}/{}] WorldItemDefinition {}", i, ItemInstances.Num(), WorldItemDefinition ? WorldItemDefinition->GetFullName() : "InvalidObject");
|
||||
|
||||
if (!WorldItemDefinition)
|
||||
continue;
|
||||
|
||||
auto ShouldBeDropped = WorldItemDefinition->CanBeDropped(); // WorldItemDefinition->ShouldDropOnDeath();
|
||||
|
||||
LOG_INFO(LogDev, "[{}/{}] ShouldBeDropped {}", i, ItemInstances.Num(), ShouldBeDropped);
|
||||
// LOG_INFO(LogDev, "[{}/{}] ShouldBeDropped {}", i, ItemInstances.Num(), ShouldBeDropped);
|
||||
|
||||
if (!ShouldBeDropped)
|
||||
continue;
|
||||
@@ -771,7 +769,7 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
||||
KillerWeaponDef = Weapon->GetWeaponData();
|
||||
}
|
||||
|
||||
LOG_INFO(LogDev, "KillerWeaponDef: {}", KillerWeaponDef ? KillerWeaponDef->GetFullName() : "InvalidObject");
|
||||
// LOG_INFO(LogDev, "KillerWeaponDef: {}", KillerWeaponDef ? KillerWeaponDef->GetFullName() : "InvalidObject");
|
||||
|
||||
RemoveFromAlivePlayers(GameMode, PlayerController, KillerPlayerState == DeadPlayerState ? nullptr : KillerPlayerState, KillerPawn, KillerWeaponDef, DeathCause, 0);
|
||||
}
|
||||
|
||||
@@ -21,24 +21,6 @@
|
||||
|
||||
void Addresses::SetupVersion()
|
||||
{
|
||||
if (false)
|
||||
{
|
||||
Engine_Version = 423;
|
||||
Fortnite_Version = 10.40;
|
||||
}
|
||||
|
||||
if (false)
|
||||
{
|
||||
Engine_Version = 424;
|
||||
Fortnite_Version = 11.01;
|
||||
}
|
||||
|
||||
if (false)
|
||||
{
|
||||
Engine_Version = 425;
|
||||
Fortnite_Version = 12.41;
|
||||
}
|
||||
|
||||
static FString(*GetEngineVersion)() = decltype(GetEngineVersion)(Memcury::Scanner::FindPattern("40 53 48 83 EC 20 48 8B D9 E8 ? ? ? ? 48 8B C8 41 B8 04 ? ? ? 48 8B D3", false).Get());
|
||||
|
||||
std::string FullVersion;
|
||||
@@ -325,10 +307,10 @@ void Offsets::FindAll()
|
||||
Offsets::ServerReplicateActors = std::floor(Fortnite_Version) == 5 ? 0x54 : 0x56;
|
||||
else if (Engine_Version >= 422 && Engine_Version <= 424)
|
||||
Offsets::ServerReplicateActors = Fortnite_Version >= 7.40 && Fortnite_Version < 8.40 ? 0x57 :
|
||||
Engine_Version == 424 ? (Fortnite_Version >= 11.00 && Fortnite_Version <= 11.01 ? 0x57 :
|
||||
Engine_Version == 424 ? (Fortnite_Version >= 11.00 && Fortnite_Version <= 11.10 ? 0x57 :
|
||||
(Fortnite_Version == 11.30 || Fortnite_Version == 11.31 ? 0x59 : 0x5A)) : 0x56;
|
||||
|
||||
// ^ I know this makes no sense, 7.40-8.40 is 0x57, other 7-10 is 0x56, 11.00-11.01 = 0x57, 11.31 = 0x59, other S11 is 0x5A
|
||||
// ^ I know this makes no sense, 7.40-8.40 is 0x57, other 7-10 is 0x56, 11.00-11.10 = 0x57, 11.30-11.31 = 0x59, other S11 is 0x5A
|
||||
|
||||
else if (std::floor(Fortnite_Version) == 12 || std::floor(Fortnite_Version) == 13)
|
||||
Offsets::ServerReplicateActors = 0x5D;
|
||||
@@ -406,21 +388,15 @@ std::vector<uint64> Addresses::GetFunctionsToNull()
|
||||
toNull.push_back(Memcury::Scanner::FindPattern("48 8B C4 48 89 58 08 48 89 70 10 57 48 81 EC ? ? ? ? 48 8B BA ? ? ? ? 48 8B DA 0F 29").Get()); // Pawn Overlap
|
||||
}
|
||||
|
||||
if (Engine_Version == 422)
|
||||
{
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("40 55 56 41 54 48 8B EC 48 81 EC ? ? ? ? 48 8B 01 4C 8B E2 48 8B F1 FF 90").Get()); // chnaging cameasesion
|
||||
}
|
||||
|
||||
if (Engine_Version == 425)
|
||||
{
|
||||
toNull.push_back(Memcury::Scanner::FindPattern("40 57 41 56 48 81 EC ? ? ? ? 80 3D ? ? ? ? ? 0F B6 FA 44 8B F1 74 3A 80 3D ? ? ? ? ? 0F 82").Get()); // collect garbage
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("48 8B C4 55 48 8D 68 A1 48 81 EC ? ? ? ? 48 89 58 08 4C 89 60 F0 45 0F B6 E0 4C").Get()); // Changing Gamesession
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("48 8B C4 55 48 8D 68 A1 48 81 EC ? ? ? ? 48 89 58 08 4C 89 60 F0 4C 8B E2 4C 89").Get()); // ^
|
||||
}
|
||||
|
||||
if (Engine_Version == 500)
|
||||
{
|
||||
toNull.push_back(Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 40 48 8B FA 48 8B D9 48 85 D2 0F 84 ? ? ? ? 8B").Get()); // idk lmfao
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("").Get()); // collectgarbage
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 40 48 8B FA 48 8B D9 48 85 D2 0F 84 ? ? ? ? 8B").Get()); // idk lmfao
|
||||
}
|
||||
|
||||
if (Fortnite_Version == 12.61)
|
||||
|
||||
@@ -257,7 +257,8 @@ void ProcessEventHook(UObject* Object, UFunction* Function, void* Parameters)
|
||||
!strstr(FunctionFullName.c_str(), "PinkOatmeal_GreenGlop_C") &&
|
||||
!strstr(ObjectName.c_str(), "CBGA_GreenGlop_WithGrav_C") &&
|
||||
!strstr(ObjectName.c_str(), "FlopperSpawn") &&
|
||||
!strstr(FunctionFullName.c_str(), "GCNL_EnvCampFire_Fire_C"))
|
||||
!strstr(FunctionFullName.c_str(), "GCNL_EnvCampFire_Fire_C") &&
|
||||
!strstr(FunctionName.c_str(), "BlueprintGetAllHighlightableComponents"))
|
||||
{
|
||||
LOG_INFO(LogDev, "Function called: {} with {}", FunctionFullName, ObjectName);
|
||||
}
|
||||
|
||||
@@ -35,8 +35,10 @@ enum ENetMode
|
||||
NM_MAX,
|
||||
};
|
||||
|
||||
static ENetMode GetNetModeHook() { /* std::cout << "AA!\n"; */ return ENetMode::NM_DedicatedServer; }
|
||||
static ENetMode GetNetModeHook2() { /* std::cout << "AA!\n"; */ return ENetMode::NM_DedicatedServer; }
|
||||
constexpr ENetMode NetMode = ENetMode::NM_DedicatedServer;
|
||||
|
||||
static ENetMode GetNetModeHook() { return NetMode; }
|
||||
static ENetMode GetNetModeHook2() { return NetMode; }
|
||||
|
||||
static bool ReturnTrueHook() { return true; }
|
||||
static float GetMaxTickRateHook() { return 30.f; }
|
||||
@@ -467,7 +469,6 @@ DWORD WINAPI Main(LPVOID)
|
||||
GameMode->Get<float>("WarmupEarlyCountdownDuration") = 0;
|
||||
}
|
||||
|
||||
|
||||
else if (GetAsyncKeyState(VK_F9) & 1)
|
||||
{
|
||||
Globals::bLogProcessEvent = !Globals::bLogProcessEvent;
|
||||
|
||||
@@ -754,6 +754,34 @@ static inline uint64 FindGIsServer()
|
||||
|
||||
// if (Fortnite_Version == 2.5)
|
||||
// return __int64(GetModuleHandleW(0)) + 0x46AD735;
|
||||
|
||||
auto Addrr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering").Get();
|
||||
|
||||
/* int found = 0;
|
||||
|
||||
for (int i = 0; i < 600; i++)
|
||||
{
|
||||
if (*(uint8_t*)(uint8_t*)(Addrr - i) == 0x88 && *(uint8_t*)(uint8_t*)(Addrr - i + 1) == 0x1D)
|
||||
{
|
||||
for (int z = 0; z < 15; z++)
|
||||
{
|
||||
LOG_INFO(LogDev, "[{}] [{}] GIsServerTest: 0x{:x}", found, z, Memcury::Scanner(Addrr - i).RelativeOffset(z).Get() - __int64(GetModuleHandleW(0)));
|
||||
}
|
||||
|
||||
found++;
|
||||
}
|
||||
|
||||
if (*(uint8_t*)(uint8_t*)(Addrr - i) == 0xC6 && *(uint8_t*)(uint8_t*)(Addrr - i + 1) == 0x05)
|
||||
{
|
||||
for (int z = 0; z < 15; z++)
|
||||
{
|
||||
LOG_INFO(LogDev, "[{}] [{}] GIsServerTest: 0x{:x}", found, z, Memcury::Scanner(Addrr - i).RelativeOffset(z).Get() - __int64(GetModuleHandleW(0)));
|
||||
}
|
||||
|
||||
found++;
|
||||
}
|
||||
} */
|
||||
|
||||
if (Fortnite_Version == 12.41)
|
||||
return __int64(GetModuleHandleW(0)) + 0x804B65A;
|
||||
|
||||
|
||||
@@ -313,44 +313,4 @@ namespace MemberOffsets
|
||||
{
|
||||
extern inline int bDBNO = 0, Downer = 0, FinisherOrDowner = 0, DeathCause = 0, Distance = 0, DeathLocation = 0, bInitialized = 0, DeathTags = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static UObject* GetPlaylistToUse()
|
||||
{
|
||||
auto Playlist = FindObject("/Game/Athena/Playlists/Playlist_DefaultSolo.Playlist_DefaultSolo");
|
||||
// Playlist = FindObject("/BlueCheese/Playlists/Playlist_ShowdownAlt_BlueCheese_Trios.Playlist_ShowdownAlt_BlueCheese_Trios");
|
||||
|
||||
/* if (Globals::bGoingToPlayEvent)
|
||||
{
|
||||
if (Fortnite_Version != 12.61)
|
||||
{
|
||||
auto EventPlaylist = GetEventPlaylist();
|
||||
|
||||
if (!EventPlaylist)
|
||||
{
|
||||
LOG_ERROR(LogPlaylist, "No event playlist! Turning off going to play event");
|
||||
Globals::bGoingToPlayEvent = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Playlist = EventPlaylist;
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
// SET OVERRIDE PLAYLIST DOWN HERE
|
||||
|
||||
// Playlist = FindObject("/Game/Athena/Playlists/Playground/Playlist_Playground.Playlist_Playground");
|
||||
|
||||
// Playlist = FindObject("/Game/Athena/Playlists/Carmine/Playlist_Carmine.Playlist_Carmine");
|
||||
|
||||
// Playlist = FindObject("/MoleGame/Playlists/Playlist_MoleGame.Playlist_MoleGame");
|
||||
// Playlist = FindObject("/Game/Athena/Playlists/DADBRO/Playlist_DADBRO_Squads_8.Playlist_DADBRO_Squads_8");
|
||||
|
||||
Playlist = FindObject("/Game/Athena/Playlists/Playlist_DefaultDuo.Playlist_DefaultDuo");
|
||||
|
||||
if (Globals::bCreative)
|
||||
Playlist = FindObject("/Game/Athena/Playlists/Creative/Playlist_PlaygroundV2.Playlist_PlaygroundV2");
|
||||
|
||||
return Playlist;
|
||||
}
|
||||
Reference in New Issue
Block a user