- use an inventory flag to decide what items are slipped by DF_NO_HEALTH and DF_NO_ARMOR. With all the changes over the last 10 years this had become too spotty.
- use an enum type for ItemFlags, just like it was done for actor flags. Since the flag word is almost full it may soon be necessary to add a second one and then this kind of security check may become necessary.
This commit is contained in:
parent
dc6c91042b
commit
12915b5f6e
7 changed files with 34 additions and 24 deletions
|
|
@ -3217,13 +3217,13 @@ DEFINE_ACTION_FUNCTION(AActor, A_ActiveSound)
|
|||
//---------------------------------------------------------------------------
|
||||
void ModifyDropAmount(AInventory *inv, int dropamount)
|
||||
{
|
||||
int flagmask = IF_IGNORESKILL;
|
||||
auto flagmask = IF_IGNORESKILL;
|
||||
double dropammofactor = G_SkillProperty(SKILLP_DropAmmoFactor);
|
||||
// Default drop amount is half of regular amount * regular ammo multiplication
|
||||
if (dropammofactor == -1)
|
||||
{
|
||||
dropammofactor = 0.5;
|
||||
flagmask = 0;
|
||||
flagmask = ItemFlag(0);
|
||||
}
|
||||
|
||||
if (dropamount > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue