mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +00:00
- 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
|
@ -1,3 +1,6 @@
|
|||
January 11, 2009 (Changes by Graf Zahl)
|
||||
- Added option to specify the amount of ammo to be given by a WeaponGiver.
|
||||
|
||||
January 10, 2009 (Changes by Graf Zahl)
|
||||
- fixed: Identification of Doom1 Freedoom IWAD did not work.
|
||||
- fixed: UDMF did not initialize a sector's light colors.
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -327,6 +327,8 @@ Actor Weapon : Inventory native
|
|||
|
||||
ACTOR WeaponGiver : Weapon native
|
||||
{
|
||||
Weapon.AmmoGive1 -1
|
||||
Weapon.AmmoGive2 -1
|
||||
}
|
||||
|
||||
Actor WeaponHolder : Inventory native
|
||||
|
|
Loading…
Reference in a new issue