- consolidated the check for "is actor an owned inventory item" into a subfunction.
This check occured 9 times in the source, better have it only once.
This commit is contained in:
parent
ee08412e49
commit
319f8743db
8 changed files with 20 additions and 32 deletions
|
|
@ -3697,8 +3697,7 @@ do_count:
|
|||
if (tag == -1 || tagManager.SectorHasTag(actor->Sector, tag))
|
||||
{
|
||||
// Don't count items in somebody's inventory
|
||||
if (!actor->IsKindOf (RUNTIME_CLASS(AInventory)) ||
|
||||
static_cast<AInventory *>(actor)->Owner == NULL)
|
||||
if (actor->IsMapActor())
|
||||
{
|
||||
count++;
|
||||
}
|
||||
|
|
@ -3717,8 +3716,7 @@ do_count:
|
|||
if (tag == -1 || tagManager.SectorHasTag(actor->Sector, tag))
|
||||
{
|
||||
// Don't count items in somebody's inventory
|
||||
if (!actor->IsKindOf (RUNTIME_CLASS(AInventory)) ||
|
||||
static_cast<AInventory *>(actor)->Owner == NULL)
|
||||
if (actor->IsMapActor())
|
||||
{
|
||||
count++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue