- Added option to specify the amount of ammo to be given by a WeaponGiver.
SVN r1357 (trunk)
This commit is contained in:
parent
b4b76ed4e6
commit
51391f889c
3 changed files with 7 additions and 0 deletions
|
|
@ -607,6 +607,8 @@ bool AWeaponGiver::TryPickup(AActor *&toucher)
|
|||
if (weap != NULL)
|
||||
{
|
||||
weap->ItemFlags &= ~IF_ALWAYSPICKUP; // use the flag of this item only.
|
||||
if (weap->AmmoGive1 >= 0) weap->AmmoGive1 = AmmoGive1;
|
||||
if (weap->AmmoGive2 >= 0) weap->AmmoGive2 = AmmoGive2;
|
||||
bool res = weap->CallTryPickup(toucher);
|
||||
if (!res) weap->Destroy();
|
||||
else GoAwayAndDie();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue