From 294bf6ed53ee8971bd3491e5effb109f2f1be6e1 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 31 Dec 2017 15:23:54 +0200 Subject: [PATCH] Simplified base class checks in AActor::GiveInventory() --- src/p_mobj.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 1cc9d96f62..c688f0b98b 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -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; }