mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-14 03:02:22 +01:00
fix preloaded fr
This commit is contained in:
@@ -206,6 +206,7 @@ APawn* AGameModeBase::SpawnDefaultPawnForHook(AGameModeBase* GameMode, AControll
|
|||||||
}
|
}
|
||||||
|
|
||||||
const auto& ItemInstances = WorldInventory->GetItemList().GetItemInstances();
|
const auto& ItemInstances = WorldInventory->GetItemList().GetItemInstances();
|
||||||
|
const auto& ReplicatedEntries = WorldInventory->GetItemList().GetReplicatedEntries();
|
||||||
|
|
||||||
for (int i = 0; i < ItemInstances.Num(); ++i)
|
for (int i = 0; i < ItemInstances.Num(); ++i)
|
||||||
{
|
{
|
||||||
@@ -221,6 +222,18 @@ APawn* AGameModeBase::SpawnDefaultPawnForHook(AGameModeBase* GameMode, AControll
|
|||||||
WorldInventory->GetItemList().MarkItemDirty(ItemInstance->GetItemEntry());
|
WorldInventory->GetItemList().MarkItemDirty(ItemInstance->GetItemEntry());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < ReplicatedEntries.Num(); ++i)
|
||||||
|
{
|
||||||
|
auto ReplicatedEntry = ReplicatedEntries.AtPtr(i, FFortItemEntry::GetStructSize());
|
||||||
|
|
||||||
|
auto WeaponItemDefinition = Cast<UFortWeaponItemDefinition>(ReplicatedEntry->GetItemDefinition());
|
||||||
|
|
||||||
|
if (!WeaponItemDefinition) continue;
|
||||||
|
|
||||||
|
ReplicatedEntry->GetLoadedAmmo() = WeaponItemDefinition->GetClipSize();
|
||||||
|
WorldInventory->GetItemList().MarkItemDirty(ReplicatedEntry);
|
||||||
|
}
|
||||||
|
|
||||||
WorldInventory->Update();
|
WorldInventory->Update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ void SetZoneToIndexHook(AFortGameModeAthena* GameModeAthena, int OverridePhaseMa
|
|||||||
|
|
||||||
LOG_INFO(LogDev, "NewLateGameSafeZonePhase: {}", NewLateGameSafeZonePhase);
|
LOG_INFO(LogDev, "NewLateGameSafeZonePhase: {}", NewLateGameSafeZonePhase);
|
||||||
|
|
||||||
static bool bReversing = false;
|
|
||||||
|
|
||||||
if (Fortnite_Version < 13)
|
if (Fortnite_Version < 13)
|
||||||
{
|
{
|
||||||
if (Globals::bLateGame.load())
|
if (Globals::bLateGame.load())
|
||||||
@@ -34,7 +32,7 @@ void SetZoneToIndexHook(AFortGameModeAthena* GameModeAthena, int OverridePhaseMa
|
|||||||
|
|
||||||
if (NewLateGameSafeZonePhase == EndReverseZonePhase)
|
if (NewLateGameSafeZonePhase == EndReverseZonePhase)
|
||||||
{
|
{
|
||||||
bReversing = false;
|
bZoneReversing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NewLateGameSafeZonePhase == 2 || NewLateGameSafeZonePhase == 3)
|
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.
|
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 NewLateGameSafeZonePhase++;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -130,15 +128,15 @@ void SetZoneToIndexHook(AFortGameModeAthena* GameModeAthena, int OverridePhaseMa
|
|||||||
|
|
||||||
if (NewLateGameSafeZonePhase == EndReverseZonePhase)
|
if (NewLateGameSafeZonePhase == EndReverseZonePhase)
|
||||||
{
|
{
|
||||||
bReversing = false;
|
bZoneReversing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NewLateGameSafeZonePhase >= StartReverseZonePhase) // This means instead of going to the 8th phase its gonna go down.
|
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 NewLateGameSafeZonePhase++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ extern inline bool bDebugPrintLooting = false;
|
|||||||
extern inline bool bDebugPrintFloorLoot = false;
|
extern inline bool bDebugPrintFloorLoot = false;
|
||||||
extern inline bool bDebugPrintSwapping = false;
|
extern inline bool bDebugPrintSwapping = false;
|
||||||
extern inline bool bEnableBotTick = false;
|
extern inline bool bEnableBotTick = false;
|
||||||
|
extern inline bool bZoneReversing = false;
|
||||||
extern inline bool bEnableCombinePickup = false;
|
extern inline bool bEnableCombinePickup = false;
|
||||||
extern inline int AmountOfBotsToSpawn = 0;
|
extern inline int AmountOfBotsToSpawn = 0;
|
||||||
extern inline bool bEnableRebooting = false;
|
extern inline bool bEnableRebooting = false;
|
||||||
@@ -1166,6 +1167,9 @@ static inline void MainUI()
|
|||||||
}
|
}
|
||||||
else if (Tab == LATEGAME_TAB)
|
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);
|
ImGui::Checkbox("Enable Reverse Zone (EXPERIMENTAL)", &bEnableReverseZone);
|
||||||
|
|
||||||
if (bEnableReverseZone)
|
if (bEnableReverseZone)
|
||||||
|
|||||||
Reference in New Issue
Block a user