qzdoom/wadsrc/static/zscript/shared/player_inventory.txt
2018-12-01 17:03:58 +01:00

26 lines
No EOL
617 B
Text

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;
}
}
}