gzdoom/wadsrc/static/zscript/shared/player_inventory.txt

26 lines
617 B
Text
Raw Normal View History

2018-12-01 16:03:58 +00:00
extend class PlayerPawn
{
//===========================================================================
//
// APlayerPawn :: AddInventory
//
//===========================================================================
override void AddInventory (Inventory item)
{
// Adding inventory to a voodoo doll should add it to the real player instead.
if (player != NULL && player.mo != self && player.mo != NULL)
{
player.mo.AddInventory (item);
return;
}
Super.AddInventory (item);
// If nothing is selected, select this item.
if (InvSel == NULL && item.bInvBar)
{
InvSel = item;
}
}
}