- 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
|
|
@ -914,10 +914,7 @@ static bool IsActorACountItem(AActor *mo)
|
|||
// [SP] for all actors
|
||||
static bool IsActor(AActor *mo)
|
||||
{
|
||||
if (mo->IsKindOf(RUNTIME_CLASS(AInventory)))
|
||||
return static_cast<AInventory *>(mo)->Owner == NULL; // [SP] Exclude inventory-owned items
|
||||
else
|
||||
return true;
|
||||
return mo->IsMapActor();
|
||||
}
|
||||
|
||||
// [SP] modified - now allows showing count only, new arg must be passed. Also now still counts regardless, if lists are printed.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue