- scriptified AddInventory.

This commit is contained in:
Christoph Oelckers 2018-12-01 17:03:58 +01:00
commit a426655d61
8 changed files with 64 additions and 68 deletions

View file

@ -938,29 +938,6 @@ void APlayerPawn::PostBeginPlay()
}
}
//===========================================================================
//
// APlayerPawn :: AddInventory
//
//===========================================================================
void APlayerPawn::AddInventory (AInventory *item)
{
// Adding inventory to a voodoo doll should add it to the real player instead.
if (player != NULL && player->mo != this && player->mo != NULL)
{
player->mo->AddInventory (item);
return;
}
Super::AddInventory (item);
// If nothing is selected, select this item.
if (InvSel == NULL && (item->ItemFlags & IF_INVBAR))
{
InvSel = item;
}
}
//===========================================================================
//
// APlayerPawn :: RemoveInventory