- 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:
parent
1febf277af
commit
45691e91c9
2 changed files with 0 additions and 44 deletions
43
src/info.cpp
43
src/info.cpp
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue