- moved ValidateInvFirst to the script side because this was one of the major functions that directly reference AInventory.
This commit is contained in:
parent
bc1990b6d7
commit
5c647de70c
8 changed files with 120 additions and 117 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue