- fixed: For an initial weapon pickup, sv_unlimited_pickup wasn't checked for the included ammo.

This commit is contained in:
Christoph Oelckers 2018-12-21 08:59:37 +01:00
parent 789941f24d
commit 9fab5f3b2c
1 changed files with 2 additions and 2 deletions

View File

@ -717,10 +717,10 @@ class Weapon : StateProvider
ammoitem.Amount = MIN (amount, ammoitem.MaxAmount);
ammoitem.AttachToOwner (other);
}
else if (ammoitem.Amount < ammoitem.MaxAmount)
else if (ammoitem.Amount < ammoitem.MaxAmount || sv_unlimited_pickup)
{
ammoitem.Amount += amount;
if (ammoitem.Amount > ammoitem.MaxAmount)
if (ammoitem.Amount > ammoitem.MaxAmount && !sv_unlimited_pickup)
{
ammoitem.Amount = ammoitem.MaxAmount;
}