- split up PClass::Derive and its child functions because part of them is also needed when initializing an inherited native class with the properties of its parent - but calling the base version in PClass is not possible.

- moved a few AActor properties out of the EXE so that I could easily test if it works.
This commit is contained in:
Christoph Oelckers 2016-02-10 00:17:00 +01:00
commit 6ce0c9f78e
12 changed files with 29 additions and 29 deletions

View file

@ -30,10 +30,10 @@ PClassInventory::PClassInventory()
AltHUDIcon.SetNull();
}
void PClassInventory::Derive(PClass *newclass)
void PClassInventory::DeriveData(PClass *newclass)
{
assert(newclass->IsKindOf(RUNTIME_CLASS(PClassInventory)));
Super::Derive(newclass);
Super::DeriveData(newclass);
PClassInventory *newc = static_cast<PClassInventory *>(newclass);
newc->PickupMessage = PickupMessage;
@ -60,10 +60,10 @@ PClassAmmo::PClassAmmo()
DropAmount = 0;
}
void PClassAmmo::Derive(PClass *newclass)
void PClassAmmo::DeriveData(PClass *newclass)
{
assert(newclass->IsKindOf(RUNTIME_CLASS(PClassAmmo)));
Super::Derive(newclass);
Super::DeriveData(newclass);
PClassAmmo *newc = static_cast<PClassAmmo *>(newclass);
newc->DropAmount = DropAmount;
@ -1684,10 +1684,10 @@ PClassHealth::PClassHealth()
//
//===========================================================================
void PClassHealth::Derive(PClass *newclass)
void PClassHealth::DeriveData(PClass *newclass)
{
assert(newclass->IsKindOf(RUNTIME_CLASS(PClassHealth)));
Super::Derive(newclass);
Super::DeriveData(newclass);
PClassHealth *newc = static_cast<PClassHealth *>(newclass);
newc->LowHealth = LowHealth;