- cleaned up the PointerSubstitution code
Since the only thing it gets used for is swapping out PlayerPawns it can safely skip all global variables that never point to a live player, which allowed to remove quite a bit of code here that stood in the way of scriptifying more content
This commit is contained in:
parent
108874f379
commit
02de10f657
7 changed files with 23 additions and 96 deletions
|
|
@ -67,7 +67,6 @@ public:
|
|||
void Interpolate(double smoothratio);
|
||||
|
||||
virtual void Serialize(FSerializer &arc);
|
||||
size_t PointerSubstitution (DObject *old, DObject *notOld);
|
||||
size_t PropagateMark();
|
||||
};
|
||||
|
||||
|
|
@ -535,25 +534,6 @@ void DSectorPlaneInterpolation::Serialize(FSerializer &arc)
|
|||
("attached", attached);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
size_t DSectorPlaneInterpolation::PointerSubstitution (DObject *old, DObject *notOld)
|
||||
{
|
||||
int subst = 0;
|
||||
for(unsigned i=0; i<attached.Size(); i++)
|
||||
{
|
||||
if (attached[i] == old)
|
||||
{
|
||||
attached[i] = (DInterpolation*)notOld;
|
||||
subst++;
|
||||
}
|
||||
}
|
||||
return subst;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue