- Dropped items with the DONTGIB flag set will no longer be destroyed by crushers.

SVN r4215 (trunk)
This commit is contained in:
Randy Heit 2013-04-16 17:55:17 +00:00
commit a5d770b433
4 changed files with 30 additions and 9 deletions

View file

@ -515,6 +515,33 @@ void AInventory::BeginPlay ()
flags |= MF_DROPPED; // [RH] Items are dropped by default
}
//===========================================================================
//
// AInventory :: Grind
//
//===========================================================================
bool AInventory::Grind(bool items)
{
// Does this grind request even care about items?
if (!items)
{
return false;
}
// Dropped items are normally destroyed by crushers. Set the DONTGIB flag,
// and they'll act like corpses with it set and be immune to crushers.
if (flags & MF_DROPPED)
{
if (!(flags3 & MF3_DONTGIB))
{
Destroy();
}
return false;
}
// Non-dropped items call the super method for compatibility.
return Super::Grind(items);
}
//===========================================================================
//
// AInventory :: DoEffect