diff --git a/Project Reboot 3.0/GameModeBase.cpp b/Project Reboot 3.0/GameModeBase.cpp index 9c2d317..8c2c8a4 100644 --- a/Project Reboot 3.0/GameModeBase.cpp +++ b/Project Reboot 3.0/GameModeBase.cpp @@ -206,6 +206,7 @@ APawn* AGameModeBase::SpawnDefaultPawnForHook(AGameModeBase* GameMode, AControll } const auto& ItemInstances = WorldInventory->GetItemList().GetItemInstances(); + const auto& ReplicatedEntries = WorldInventory->GetItemList().GetReplicatedEntries(); for (int i = 0; i < ItemInstances.Num(); ++i) { @@ -221,6 +222,18 @@ APawn* AGameModeBase::SpawnDefaultPawnForHook(AGameModeBase* GameMode, AControll WorldInventory->GetItemList().MarkItemDirty(ItemInstance->GetItemEntry()); } + for (int i = 0; i < ReplicatedEntries.Num(); ++i) + { + auto ReplicatedEntry = ReplicatedEntries.AtPtr(i, FFortItemEntry::GetStructSize()); + + auto WeaponItemDefinition = Cast(ReplicatedEntry->GetItemDefinition()); + + if (!WeaponItemDefinition) continue; + + ReplicatedEntry->GetLoadedAmmo() = WeaponItemDefinition->GetClipSize(); + WorldInventory->GetItemList().MarkItemDirty(ReplicatedEntry); + } + WorldInventory->Update(); } } diff --git a/Project Reboot 3.0/extra.cpp b/Project Reboot 3.0/extra.cpp index 32d48af..0929dde 100644 --- a/Project Reboot 3.0/extra.cpp +++ b/Project Reboot 3.0/extra.cpp @@ -22,8 +22,6 @@ void SetZoneToIndexHook(AFortGameModeAthena* GameModeAthena, int OverridePhaseMa LOG_INFO(LogDev, "NewLateGameSafeZonePhase: {}", NewLateGameSafeZonePhase); - static bool bReversing = false; - if (Fortnite_Version < 13) { if (Globals::bLateGame.load()) @@ -34,7 +32,7 @@ void SetZoneToIndexHook(AFortGameModeAthena* GameModeAthena, int OverridePhaseMa if (NewLateGameSafeZonePhase == EndReverseZonePhase) { - bReversing = false; + bZoneReversing = false; } if (NewLateGameSafeZonePhase == 2 || NewLateGameSafeZonePhase == 3) @@ -47,10 +45,10 @@ void SetZoneToIndexHook(AFortGameModeAthena* GameModeAthena, int OverridePhaseMa if (NewLateGameSafeZonePhase >= StartReverseZonePhase) // This means instead of going to the 8th phase its gonna go down. { - bReversing = true; + bZoneReversing = true; } - if (bReversing && bEnableReverseZone) NewLateGameSafeZonePhase--; + if (bZoneReversing && bEnableReverseZone) NewLateGameSafeZonePhase--; else NewLateGameSafeZonePhase++; return; @@ -130,15 +128,15 @@ void SetZoneToIndexHook(AFortGameModeAthena* GameModeAthena, int OverridePhaseMa if (NewLateGameSafeZonePhase == EndReverseZonePhase) { - bReversing = false; + bZoneReversing = false; } if (NewLateGameSafeZonePhase >= StartReverseZonePhase) // This means instead of going to the 8th phase its gonna go down. { - bReversing = true; + bZoneReversing = true; } - if (bReversing && bEnableReverseZone) NewLateGameSafeZonePhase--; + if (bZoneReversing && bEnableReverseZone) NewLateGameSafeZonePhase--; else NewLateGameSafeZonePhase++; } else diff --git a/Project Reboot 3.0/gui.h b/Project Reboot 3.0/gui.h index 898dd61..a56f749 100644 --- a/Project Reboot 3.0/gui.h +++ b/Project Reboot 3.0/gui.h @@ -81,6 +81,7 @@ extern inline bool bDebugPrintLooting = false; extern inline bool bDebugPrintFloorLoot = false; extern inline bool bDebugPrintSwapping = false; extern inline bool bEnableBotTick = false; +extern inline bool bZoneReversing = false; extern inline bool bEnableCombinePickup = false; extern inline int AmountOfBotsToSpawn = 0; extern inline bool bEnableRebooting = false; @@ -1166,6 +1167,9 @@ static inline void MainUI() } else if (Tab == LATEGAME_TAB) { + if (bEnableReverseZone) + ImGui::Text(std::format("Currently {}eversing zone", bZoneReversing ? "r" : "not r").c_str()); + ImGui::Checkbox("Enable Reverse Zone (EXPERIMENTAL)", &bEnableReverseZone); if (bEnableReverseZone)