mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 04:51:19 +00:00
- added Hirogen2's Backpack fix for sv_unlimited_pickup.
SVN r2054 (trunk)
This commit is contained in:
parent
4a8518e4f1
commit
b6557a82ff
2 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
December 27, 2009 (Changes by Graf Zahl)
|
||||
- added Hirogen2's Backpack fix for sv_unlimited_pickup.
|
||||
- added a linedef based method to define portals. Portals defined this way
|
||||
still have the same limitations as those defines with the portal things.
|
||||
|
||||
|
|
|
@ -1638,7 +1638,7 @@ bool ABackpackItem::HandlePickup (AInventory *item)
|
|||
{
|
||||
if (probe->GetClass()->ParentClass == RUNTIME_CLASS(AAmmo))
|
||||
{
|
||||
if (probe->Amount < probe->MaxAmount)
|
||||
if (probe->Amount < probe->MaxAmount || sv_unlimited_pickup)
|
||||
{
|
||||
int amount = static_cast<AAmmo*>(probe->GetDefault())->BackpackAmount;
|
||||
// extra ammo in baby mode and nightmare mode
|
||||
|
@ -1647,7 +1647,7 @@ bool ABackpackItem::HandlePickup (AInventory *item)
|
|||
amount = FixedMul(amount, G_SkillProperty(SKILLP_AmmoFactor));
|
||||
}
|
||||
probe->Amount += amount;
|
||||
if (probe->Amount > probe->MaxAmount)
|
||||
if (probe->Amount > probe->MaxAmount && !sv_unlimited_pickup)
|
||||
{
|
||||
probe->Amount = probe->MaxAmount;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue