mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-15 00:42:20 +00:00
26 lines
617 B
Text
26 lines
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;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|