mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- let DWaggleBase use the interpolation pointer of its parent instead of defining its own one.
- do not call checking code for loading savegames when writing them in ACS module serializer.
This commit is contained in:
parent
36bf099d54
commit
2318db0b1a
3 changed files with 10 additions and 16 deletions
|
@ -1613,12 +1613,15 @@ void FBehavior::StaticSerializeModuleStates (FSerializer &arc)
|
|||
auto modnum = StaticModules.Size();
|
||||
|
||||
if (arc.BeginArray("acsmodules"))
|
||||
{
|
||||
if (arc.isReading())
|
||||
{
|
||||
int modnum = arc.ArraySize();
|
||||
if (modnum != StaticModules.Size())
|
||||
{
|
||||
I_Error("Level was saved with a different number of ACS modules. (Have %d, save has %d)", StaticModules.Size(), modnum);
|
||||
}
|
||||
}
|
||||
|
||||
for (modnum = 0; modnum < StaticModules.Size(); ++modnum)
|
||||
{
|
||||
|
|
|
@ -1103,9 +1103,7 @@ bool EV_DoChange (line_t *line, EChange changetype, int tag)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
IMPLEMENT_POINTY_CLASS (DWaggleBase)
|
||||
DECLARE_POINTER(m_Interpolation)
|
||||
END_POINTERS
|
||||
IMPLEMENT_CLASS (DWaggleBase)
|
||||
|
||||
IMPLEMENT_CLASS (DFloorWaggle)
|
||||
IMPLEMENT_CLASS (DCeilingWaggle)
|
||||
|
@ -1124,8 +1122,7 @@ void DWaggleBase::Serialize(FSerializer &arc)
|
|||
("scale", m_Scale)
|
||||
("scaledelta", m_ScaleDelta)
|
||||
("ticker", m_Ticker)
|
||||
("state", m_State)
|
||||
("interpolation", m_Interpolation);
|
||||
("state", m_State);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -1145,11 +1142,6 @@ DWaggleBase::DWaggleBase (sector_t *sec)
|
|||
|
||||
void DWaggleBase::Destroy()
|
||||
{
|
||||
if (m_Interpolation != NULL)
|
||||
{
|
||||
m_Interpolation->DelRef();
|
||||
m_Interpolation = NULL;
|
||||
}
|
||||
Super::Destroy();
|
||||
}
|
||||
|
||||
|
@ -1244,7 +1236,7 @@ DFloorWaggle::DFloorWaggle (sector_t *sec)
|
|||
: Super (sec)
|
||||
{
|
||||
sec->floordata = this;
|
||||
m_Interpolation = sec->SetInterpolation(sector_t::FloorMove, true);
|
||||
interpolation = sec->SetInterpolation(sector_t::FloorMove, true);
|
||||
}
|
||||
|
||||
void DFloorWaggle::Tick ()
|
||||
|
@ -1266,7 +1258,7 @@ DCeilingWaggle::DCeilingWaggle (sector_t *sec)
|
|||
: Super (sec)
|
||||
{
|
||||
sec->ceilingdata = this;
|
||||
m_Interpolation = sec->SetInterpolation(sector_t::CeilingMove, true);
|
||||
interpolation = sec->SetInterpolation(sector_t::CeilingMove, true);
|
||||
}
|
||||
|
||||
void DCeilingWaggle::Tick ()
|
||||
|
|
|
@ -612,7 +612,6 @@ protected:
|
|||
double m_ScaleDelta;
|
||||
int m_Ticker;
|
||||
int m_State;
|
||||
TObjPtr<DInterpolation> m_Interpolation;
|
||||
|
||||
friend bool EV_StartWaggle (int tag, line_t *line, int height, int speed,
|
||||
int offset, int timer, bool ceiling);
|
||||
|
|
Loading…
Reference in a new issue