mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- fixed: DInterpolation was unlinking itself from the wrong interpolator
The global one was just a leftover, the real one is on the current level.
This commit is contained in:
parent
65f3fec283
commit
0a781b9bbb
2 changed files with 8 additions and 2 deletions
|
@ -373,7 +373,7 @@ int DInterpolation::DelRef(bool force)
|
|||
|
||||
void DInterpolation::OnDestroy()
|
||||
{
|
||||
interpolator.RemoveInterpolation(this);
|
||||
Level->interpolator.RemoveInterpolation(this);
|
||||
refcount = 0;
|
||||
Super::OnDestroy();
|
||||
}
|
||||
|
@ -388,6 +388,7 @@ void DInterpolation::Serialize(FSerializer &arc)
|
|||
{
|
||||
Super::Serialize(arc);
|
||||
arc("refcount", refcount);
|
||||
arc("level", Level);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -403,6 +404,7 @@ void DInterpolation::Serialize(FSerializer &arc)
|
|||
//==========================================================================
|
||||
|
||||
DSectorPlaneInterpolation::DSectorPlaneInterpolation(sector_t *_sector, bool _plane, bool attach)
|
||||
: DInterpolation(sector->Level)
|
||||
{
|
||||
sector = _sector;
|
||||
ceiling = _plane;
|
||||
|
@ -568,6 +570,7 @@ size_t DSectorPlaneInterpolation::PropagateMark()
|
|||
//==========================================================================
|
||||
|
||||
DSectorScrollInterpolation::DSectorScrollInterpolation(sector_t *_sector, bool _plane)
|
||||
: DInterpolation(sector->Level)
|
||||
{
|
||||
sector = _sector;
|
||||
ceiling = _plane;
|
||||
|
@ -673,6 +676,7 @@ void DSectorScrollInterpolation::Serialize(FSerializer &arc)
|
|||
//==========================================================================
|
||||
|
||||
DWallScrollInterpolation::DWallScrollInterpolation(side_t *_side, int _part)
|
||||
: DInterpolation(side->GetLevel())
|
||||
{
|
||||
side = _side;
|
||||
part = _part;
|
||||
|
@ -770,6 +774,7 @@ void DWallScrollInterpolation::Serialize(FSerializer &arc)
|
|||
//==========================================================================
|
||||
|
||||
DPolyobjInterpolation::DPolyobjInterpolation(FPolyObj *po)
|
||||
: DInterpolation(po->Level)
|
||||
{
|
||||
poly = po;
|
||||
oldverts.Resize(po->Vertices.Size() << 1);
|
||||
|
|
|
@ -19,9 +19,10 @@ class DInterpolation : public DObject
|
|||
TObjPtr<DInterpolation*> Prev;
|
||||
|
||||
protected:
|
||||
FLevelLocals *Level;
|
||||
int refcount;
|
||||
|
||||
DInterpolation();
|
||||
DInterpolation(FLevelLocals *l) : Level(l) {}
|
||||
|
||||
public:
|
||||
int AddRef();
|
||||
|
|
Loading…
Reference in a new issue