- added Hirogen2's Backpack fix for sv_unlimited_pickup.

SVN r2054 (trunk)
This commit is contained in:
Christoph Oelckers 2009-12-28 00:07:04 +00:00
parent 4a8518e4f1
commit b6557a82ff
2 changed files with 3 additions and 2 deletions

View File

@ -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.

View File

@ -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;
}