Skip to content

Commit

Permalink
Dont Delete Ammo, Use It Instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Deaod committed Jun 12, 2021
1 parent 3e05446 commit e5a3056
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/ST_Mutator.uc
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ function SwitchWeaponsInventory(Pawn Other)
local string NewName[32];
local Weapon OldWeap[32];
local class<Ammo> AmmoCls[32];
local Inventory AmmoTyp[32];
local Ammo AmmoTyp[32];
local int NewCount, x;
local name n;
local UTPure UTP;
Expand Down Expand Up @@ -599,9 +599,9 @@ function SwitchWeaponsInventory(Pawn Other)
for (x = NewCount -1; x >= 0; x--)
{ // Now replace
if (AmmoTyp[x] == none)
AmmoTyp[x] = Other.FindInventoryType(AmmoCls[x]);
AmmoTyp[x] = Ammo(Other.FindInventoryType(AmmoCls[x]));
if (AmmoTyp[x] != none)
Other.DeleteInventory(AmmoTyp[x]);
AmmoTyp[x].UseAmmo(W.PickupAmmoCount);

GiveGoodWeapon(Other, NewName[x], OldWeap[x]);
OldWeap[x].GotoState('');
Expand Down

0 comments on commit e5a3056

Please sign in to comment.