- scriptified BasicArmorBonus.

This commit is contained in:
Christoph Oelckers 2017-01-18 20:23:13 +01:00
commit 2dd6fb9595
13 changed files with 180 additions and 265 deletions

View file

@ -790,13 +790,9 @@ bool AActor::GiveInventory(PClassInventory *type, int amount, bool givecheat)
item->ClearCounters();
if (!givecheat || amount > 0)
{
if (type->IsDescendantOf (RUNTIME_CLASS(ABasicArmorPickup)))
if (type->IsDescendantOf (PClass::FindActor(NAME_BasicArmorPickup)) || type->IsDescendantOf(PClass::FindActor(NAME_BasicArmorBonus)))
{
static_cast<ABasicArmorPickup*>(item)->SaveAmount *= amount;
}
else if (type->IsDescendantOf (RUNTIME_CLASS(ABasicArmorBonus)))
{
static_cast<ABasicArmorBonus*>(item)->SaveAmount *= amount;
item->IntVar(NAME_SaveAmount) *= amount;
}
else
{