- 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

@ -373,18 +373,6 @@ void APowerup::OwnerDied ()
Destroy ();
}
//===========================================================================
//
// AInventory :: GetNoTeleportFreeze
//
//===========================================================================
bool APowerup::GetNoTeleportFreeze ()
{
if (ItemFlags & IF_NOTELEPORTFREEZE) return true;
return Super::GetNoTeleportFreeze();
}
// Invulnerability Powerup ---------------------------------------------------
IMPLEMENT_CLASS(APowerInvulnerable, false, false)
@ -1213,20 +1201,6 @@ void APowerSpeed::Serialize(FSerializer &arc)
arc("speedflags", SpeedFlags);
}
//===========================================================================
//
// APowerSpeed :: GetSpeedFactor
//
//===========================================================================
double APowerSpeed ::GetSpeedFactor ()
{
if (Inventory != NULL)
return Speed * Inventory->GetSpeedFactor();
else
return Speed;
}
//===========================================================================
//
// APowerSpeed :: DoEffect