- 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:
Christoph Oelckers 2018-12-02 16:53:12 +01:00
commit 319f8743db
8 changed files with 20 additions and 32 deletions

View file

@ -2100,7 +2100,7 @@ static int RemoveClass(const PClass *cls)
continue;
}
// [SP] Don't remove owned inventory objects.
if (actor->IsKindOf(RUNTIME_CLASS(AInventory)) && static_cast<AInventory *>(actor)->Owner != NULL)
if (!actor->IsMapActor())
{
continue;
}