- scriptified the weapon piece functions.

- fixed: ClearInventory did not process depleted items properly.
- changed HexenArmor from UNDROPPABLE to UNTOSSABLE because this allowed to remove some special handling in ClearInventory. The only other place which checks this flag also checks UNTOSSABLE.
This commit is contained in:
Christoph Oelckers 2017-01-18 17:26:12 +01:00
parent d8acf774a6
commit 30a8541a15
12 changed files with 290 additions and 313 deletions

View file

@ -1211,12 +1211,7 @@ void AActor::ClearInventory()
if (!(inv->ItemFlags & IF_UNDROPPABLE))
{
inv->DepleteOrDestroy();
}
else if (inv->GetClass() == RUNTIME_CLASS(AHexenArmor))
{
AHexenArmor *harmor = static_cast<AHexenArmor *> (inv);
harmor->Slots[3] = harmor->Slots[2] = harmor->Slots[1] = harmor->Slots[0] = 0;
invp = &inv->Inventory;
if (!(inv->ObjectFlags & OF_EuthanizeMe)) invp = &inv->Inventory; // was only depleted so advance the pointer manually.
}
else
{