proper vending machines like fully, performance
This commit is contained in:
Milxnor
2023-05-08 22:28:32 -04:00
parent d5c95ac978
commit b64f569551
22 changed files with 399 additions and 221 deletions

View File

@@ -14,7 +14,7 @@ void FFortItemEntry::SetStateValue(EFortItemEntryState StateType, int IntValue)
}
}
auto idx = GetStateValues().AddUnitialized2(FFortItemEntryStateValue::GetStructSize());
auto idx = GetStateValues().AddUninitialized2(FFortItemEntryStateValue::GetStructSize()); // AddUninitialized?
GetStateValues().AtPtr(idx, FFortItemEntryStateValue::GetStructSize())->GetIntValue() = IntValue;
GetStateValues().AtPtr(idx, FFortItemEntryStateValue::GetStructSize())->GetStateType() = StateType;
@@ -27,7 +27,6 @@ void FFortItemEntry::SetStateValue(EFortItemEntryState StateType, int IntValue)
FFortItemEntry* FFortItemEntry::MakeItemEntry(UFortItemDefinition* ItemDefinition, int Count, int LoadedAmmo, float Durability)
{
bool bUseFMemoryRealloc = false; // I don't think this works because sometimes we don't free it (oops).
auto Entry = Alloc<FFortItemEntry>(GetStructSize(), bUseFMemoryRealloc);
if (!Entry)