mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- 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
|
||||
|
|
|
@ -248,7 +248,6 @@ public:
|
|||
PClassActor();
|
||||
~PClassActor();
|
||||
|
||||
virtual size_t PointerSubstitution(DObject *oldclass, DObject *newclass);
|
||||
void BuildDefaults();
|
||||
void ApplyDefaults(uint8_t *defaults);
|
||||
void RegisterIDs();
|
||||
|
|
Loading…
Reference in a new issue