- removed PClassActor::PointerSubstitution.

This is not needed anymore because classes do not need to be replaced. The only reason this was implemented was the original design with the class descriptors taking on all the metadata themselves.
This commit is contained in:
Christoph Oelckers 2017-04-11 14:03:49 +02:00
parent 1febf277af
commit 45691e91c9
2 changed files with 0 additions and 44 deletions

View file

@ -589,49 +589,6 @@ void PClassActor::SetPainChance(FName type, int chance)
} }
} }
//==========================================================================
//
// PClassActor :: ReplaceClassRef
//
//==========================================================================
size_t PClassActor::PointerSubstitution(DObject *oldclass, DObject *newclass)
{
auto changed = Super::PointerSubstitution(oldclass, newclass);
for (unsigned i = 0; i < VisibleToPlayerClass.Size(); i++)
{
if (VisibleToPlayerClass[i] == oldclass)
{
VisibleToPlayerClass[i] = static_cast<PClassActor*>(newclass);
changed++;
}
}
for (unsigned i = 0; i < ForbiddenToPlayerClass.Size(); i++)
{
if (ForbiddenToPlayerClass[i] == oldclass)
{
ForbiddenToPlayerClass[i] = static_cast<PClassActor*>(newclass);
changed++;
}
}
for (unsigned i = 0; i < RestrictedToPlayerClass.Size(); i++)
{
if (RestrictedToPlayerClass[i] == oldclass)
{
RestrictedToPlayerClass[i] = static_cast<PClassActor*>(newclass);
changed++;
}
}
AInventory *def = dyn_cast<AInventory>((AActor*)Defaults);
if (def != NULL)
{
if (def->PickupFlash == oldclass) def->PickupFlash = static_cast<PClassActor *>(newclass);
}
return changed;
}
//========================================================================== //==========================================================================
// //
// DmgFactors :: CheckFactor // DmgFactors :: CheckFactor

View file

@ -248,7 +248,6 @@ public:
PClassActor(); PClassActor();
~PClassActor(); ~PClassActor();
virtual size_t PointerSubstitution(DObject *oldclass, DObject *newclass);
void BuildDefaults(); void BuildDefaults();
void ApplyDefaults(uint8_t *defaults); void ApplyDefaults(uint8_t *defaults);
void RegisterIDs(); void RegisterIDs();