- scriptified G_PlayerFinishLevel.

Outside of SBARINFO this was the biggest remaining piece of code that referenced AInventory internals.
This commit is contained in:
Christoph Oelckers 2018-12-02 16:26:02 +01:00
commit ee08412e49
9 changed files with 168 additions and 128 deletions

View file

@ -86,6 +86,30 @@ class ScriptUtil play
}
}
//============================================================================
//
// ClearInventory
//
// Clears the inventory for one or more actors.
//
//============================================================================
static void ClearInventory (Actor activator)
{
if (activator == NULL)
{
for (int i = 0; i < MAXPLAYERS; ++i)
{
if (playeringame[i])
players[i].mo.ClearInventory();
}
}
else
{
activator.ClearInventory();
}
}
//==========================================================================
//
//