added some specific playlist items, fix s8-s10 markers because i broke, fixed removing items on aircraft on every version, added thanos stone automatic spawning, fix a bug with lategame, add marshmello stage, fix multiple battle buses, fix teams on large team gamemodes, fix some items not removing automatically
This commit is contained in:
Milxnor
2023-04-21 22:09:20 -04:00
parent a16bb42c01
commit 769dfa08ef
29 changed files with 572 additions and 93 deletions

View File

@@ -275,7 +275,9 @@ bool AFortInventory::RemoveItem(const FGuid& ItemGuid, bool* bShouldUpdate, int
if (!ItemDefinition)
return false;
if (Count < 0)
int OldCount = Count;
if (Count < 0) // idk why i have this
{
Count = 0;
bForceRemoval = true;
@@ -310,7 +312,7 @@ bool AFortInventory::RemoveItem(const FGuid& ItemGuid, bool* bShouldUpdate, int
}
}
if (NewCount > 0 || bOverrideChangeStackSize)
if (OldCount != -1 && (NewCount > 0 || bOverrideChangeStackSize))
{
ItemInstance->GetItemEntry()->GetCount() = NewCount;
ReplicatedEntry->GetCount() = NewCount;
@@ -339,6 +341,7 @@ bool AFortInventory::RemoveItem(const FGuid& ItemGuid, bool* bShouldUpdate, int
{
if (auto GadgetItemDefinition = Cast<UFortGadgetItemDefinition>(ItemDefinition))
{
LOG_INFO(LogDev, "Unequipping Gadget!");
GadgetItemDefinition->UnequipGadgetData(FortPlayerController, ItemInstances.at(i));
}
}