- cleanup of the virtual function definitions for inventory items. Let's better use 'virtual' and 'override' everywhere to make sure that nothing gets overlooked.

- added call wrappers and script hooks for all relevant virtuals in AInventory.
- made GetSpeedFactor and GetNoTeleportFreeze entirely scripted because they are too trivial - also do them iteratively, just like HandlePickup, because it's just a better way to do this stuff.
This commit is contained in:
Christoph Oelckers 2016-11-30 15:54:01 +01:00
commit 8a50004f55
16 changed files with 390 additions and 245 deletions

View file

@ -138,20 +138,7 @@ bool P_MorphPlayer (player_t *activator, player_t *p, PClassPlayerPawn *spawntyp
AInventory *next = item->Inventory;
if (item->IsKindOf (RUNTIME_CLASS(AArmor)))
{
if (item->IsKindOf (RUNTIME_CLASS(AHexenArmor)))
{
// Set the HexenArmor slots to 0, except the class slot.
AHexenArmor *hxarmor = static_cast<AHexenArmor *>(item);
hxarmor->Slots[0] = 0;
hxarmor->Slots[1] = 0;
hxarmor->Slots[2] = 0;
hxarmor->Slots[3] = 0;
hxarmor->Slots[4] = spawntype->HexenArmor[0];
}
else
{
item->DepleteOrDestroy();
}
item->DepleteOrDestroy();
}
item = next;
}