- Added a DropAmmoFactor field to WeaponGiver so that ModifyDropAmount() can record the drop
amount modifier into it without fiddling with the actual AmmoGiveX fields. SVN r4246 (trunk)
This commit is contained in:
parent
163d8ba3e6
commit
d86b16d540
3 changed files with 32 additions and 37 deletions
|
|
@ -3025,6 +3025,11 @@ void ModifyDropAmount(AInventory *inv, int dropamount)
|
|||
inv->Amount = inv->GetClass()->Meta.GetMetaInt (AIMETA_DropAmount, MAX(1, FixedMul(inv->Amount, dropammofactor)));
|
||||
inv->ItemFlags |= flagmask;
|
||||
}
|
||||
else if (inv->IsKindOf (RUNTIME_CLASS(AWeaponGiver)))
|
||||
{
|
||||
static_cast<AWeaponGiver *>(inv)->DropAmmoFactor = dropammofactor;
|
||||
inv->ItemFlags |= flagmask;
|
||||
}
|
||||
else if (inv->IsKindOf (RUNTIME_CLASS(AWeapon)))
|
||||
{
|
||||
// The same goes for ammo from a weapon.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue