- Added the item flag IF_RESTRICTABSOLUTELY. When this is set, players of the wrong class cannot

pickup an item at all. (For instance, normally players in Hexen can still pick up other players'
  weapons for ammo. With this flag set, they cannot do that either.)

SVN r3751 (trunk)
This commit is contained in:
Randy Heit 2012-07-08 02:45:46 +00:00
commit 8a925757f5
4 changed files with 6 additions and 5 deletions

View file

@ -1333,9 +1333,10 @@ bool AInventory::CallTryPickup (AActor *toucher, AActor **toucher_return)
bool res;
if (CanPickup(toucher))
res = TryPickup(toucher);
else
else if (!(ItemFlags & IF_RESTRICTABSOLUTELY))
res = TryPickupRestricted(toucher); // let an item decide for itself how it will handle this
else
return false;
// Morph items can change the toucher so we need an option to return this info.
if (toucher_return != NULL) *toucher_return = toucher;