Skip to content

Commit

Permalink
If giving ammo, an add_ammo amount should apply even if the pawn doesn't
Browse files Browse the repository at this point in the history
have the ammo type already Die4Ever#807
  • Loading branch information
theastropath authored and MQDuck committed Jul 18, 2024
1 parent 8f41aef commit 7e271ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 3 additions & 0 deletions DXRCore/DeusEx/Classes/DXRActorsBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ static function Inventory GiveExistingItem(Pawn p, Inventory item, optional int
player.UpdateAmmoBeltText(a);
item.Destroy();
return a;
} else {
//Make sure the extra ammo is included even if the pawn doesn't have it already
Ammo(item).AmmoAmount += add_ammo;
}
}

Expand Down
2 changes: 0 additions & 2 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM01.uc
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ function PreFirstEntryMapFixes()
class'GuntherWeaponMegaChoice'.static.Create(Player());
foreach AllActors(class'#var(prefix)GuntherHermann',gunther){
//Make sure he has ammo for Assault Rifle (7.62mm), Stealth Pistol(10mm), Pistol (10mm)
GiveItem(gunther, class'Ammo762mm');
GiveItem(gunther, class'Ammo762mm',300);
GiveItem(gunther, class'Ammo10mm');
GiveItem(gunther, class'Ammo10mm',150);
break;
}
Expand Down
3 changes: 0 additions & 3 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM04.uc
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,8 @@ function PreFirstEntryMapFixes()
foreach AllActors(class'#var(prefix)GilbertRenton',gilbert){
//Make sure he has ammo for Stealth Pistol(10mm), Pistol (10mm),
//Sawed-off (Buckshot shells), Mini Crossbow (Tranq Darts)
GiveItem(gilbert, class'AmmoShell');
GiveItem(gilbert, class'AmmoShell',20);
GiveItem(gilbert, class'Ammo10mm');
GiveItem(gilbert, class'Ammo10mm',20);
GiveItem(gilbert, class'AmmoDartPoison');
GiveItem(gilbert, class'AmmoDartPoison',20);
break;
}
Expand Down

0 comments on commit 7e271ae

Please sign in to comment.