mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
a bit
proper vending machines like fully, performance
This commit is contained in:
@@ -115,6 +115,7 @@ std::pair<std::vector<UFortItem*>, std::vector<UFortItem*>> AFortInventory::AddI
|
||||
CreateData.SpawnLocation = Pawn->GetActorLocation();
|
||||
CreateData.PawnOwner = Cast<AFortPawn>(Pawn);
|
||||
CreateData.SourceType = EFortPickupSourceTypeFlag::GetPlayerValue();
|
||||
CreateData.bShouldFreeItemEntryWhenDeconstructed = true;
|
||||
|
||||
AFortPickup::SpawnPickup(CreateData);
|
||||
return std::make_pair(NewItemInstances, ModifiedItemInstances);
|
||||
@@ -238,7 +239,13 @@ std::pair<std::vector<UFortItem*>, std::vector<UFortItem*>> AFortInventory::AddI
|
||||
|
||||
auto ItemEntry = FFortItemEntry::MakeItemEntry(ItemDefinition, Count, LoadedAmmo);
|
||||
auto Ret = AddItem(ItemEntry, bShouldUpdate, bShowItemToast);
|
||||
// VirtualFree(ItemEntry);
|
||||
|
||||
if (!bUseFMemoryRealloc)
|
||||
{
|
||||
FFortItemEntry::FreeItemEntry(ItemEntry);
|
||||
VirtualFree(ItemEntry, 0, MEM_RELEASE);
|
||||
}
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user