- moved ValidateInvFirst to the script side because this was one of the major functions that directly reference AInventory.

This commit is contained in:
Christoph Oelckers 2018-12-01 17:46:20 +01:00
commit 5c647de70c
8 changed files with 120 additions and 117 deletions

View file

@ -795,33 +795,6 @@ DEFINE_ACTION_FUNCTION(AActor, DestroyAllInventory)
self->DestroyAllInventory();
return 0;
}
//============================================================================
//
// AActor :: FirstInv
//
// Returns the first item in this actor's inventory that has IF_INVBAR set.
//
//============================================================================
AInventory *AActor::FirstInv ()
{
if (Inventory == NULL)
{
return NULL;
}
if (Inventory->ItemFlags & IF_INVBAR)
{
return Inventory;
}
return Inventory->NextInv ();
}
DEFINE_ACTION_FUNCTION(AActor, FirstInv)
{
PARAM_SELF_PROLOGUE(AActor);
ACTION_RETURN_OBJECT(self->FirstInv());
}
//============================================================================
//
// AActor :: UseInventory