fix 16.50, fix failing abilities s16+, ammo in bottom right

This commit is contained in:
Milxnor
2023-04-02 11:58:32 -04:00
parent 3bca6f76fe
commit 20e9fb87df
9 changed files with 106 additions and 21 deletions

View File

@@ -189,6 +189,12 @@ bool AFortInventory::RemoveItem(const FGuid& ItemGuid, bool* bShouldUpdate, int
if (!ItemDefinition)
return false;
if (Count < 0)
{
Count = 0;
bForceRemoval = true;
}
auto NewCount = ReplicatedEntry->GetCount() - Count;
if (NewCount > 0 || (ItemDefinition->ShouldPersistWhenFinalStackEmpty() && !bForceRemoval))