Simplified base class checks in AActor::GiveInventory()

This commit is contained in:
alexey.lysiuk 2017-12-31 15:23:54 +02:00
parent de4fc97ac6
commit 294bf6ed53

View file

@ -823,7 +823,7 @@ bool AActor::GiveInventory(PClassActor *type, int amount, bool givecheat)
item->ClearCounters();
if (!givecheat || amount > 0)
{
if (type->IsDescendantOf (PClass::FindActor(NAME_BasicArmorPickup)) || type->IsDescendantOf(PClass::FindActor(NAME_BasicArmorBonus)))
if (type->IsDescendantOf(NAME_BasicArmorPickup) || type->IsDescendantOf(NAME_BasicArmorBonus))
{
item->IntVar(NAME_SaveAmount) *= amount;
}