mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
- fixed: Polyobjects did not save their specialdata pointer.
- fixed: DMovePoly did not save its m_Speedv member.
This commit is contained in:
parent
d767d10322
commit
f184438032
4 changed files with 32 additions and 24 deletions
|
@ -578,6 +578,7 @@ void P_SerializePolyobjs (FArchive &arc)
|
||||||
for(i = 0, po = polyobjs; i < po_NumPolyobjs; i++, po++)
|
for(i = 0, po = polyobjs; i < po_NumPolyobjs; i++, po++)
|
||||||
{
|
{
|
||||||
arc << po->tag << po->Angle << po->StartSpot.pos << po->interpolation << po->bBlocked << po->bHasPortals;
|
arc << po->tag << po->Angle << po->StartSpot.pos << po->interpolation << po->bBlocked << po->bHasPortals;
|
||||||
|
arc << po->specialdata;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -605,6 +606,10 @@ void P_SerializePolyobjs (FArchive &arc)
|
||||||
arc << angle << delta << po->interpolation;
|
arc << angle << delta << po->interpolation;
|
||||||
arc << po->bBlocked;
|
arc << po->bBlocked;
|
||||||
arc << po->bHasPortals;
|
arc << po->bHasPortals;
|
||||||
|
if (SaveVersion >= 4548)
|
||||||
|
{
|
||||||
|
arc << po->specialdata;
|
||||||
|
}
|
||||||
|
|
||||||
po->RotatePolyobj (angle, true);
|
po->RotatePolyobj (angle, true);
|
||||||
delta -= po->StartSpot.pos;
|
delta -= po->StartSpot.pos;
|
||||||
|
|
|
@ -68,27 +68,6 @@ inline FArchive &operator<< (FArchive &arc, podoortype_t &type)
|
||||||
return arc;
|
return arc;
|
||||||
}
|
}
|
||||||
|
|
||||||
class DPolyAction : public DThinker
|
|
||||||
{
|
|
||||||
DECLARE_CLASS (DPolyAction, DThinker)
|
|
||||||
HAS_OBJECT_POINTERS
|
|
||||||
public:
|
|
||||||
DPolyAction (int polyNum);
|
|
||||||
void Serialize (FArchive &arc);
|
|
||||||
void Destroy();
|
|
||||||
void Stop();
|
|
||||||
double GetSpeed() const { return m_Speed; }
|
|
||||||
|
|
||||||
void StopInterpolation ();
|
|
||||||
protected:
|
|
||||||
DPolyAction ();
|
|
||||||
int m_PolyObj;
|
|
||||||
double m_Speed;
|
|
||||||
double m_Dist;
|
|
||||||
TObjPtr<DInterpolation> m_Interpolation;
|
|
||||||
|
|
||||||
void SetInterpolation ();
|
|
||||||
};
|
|
||||||
|
|
||||||
class DRotatePoly : public DPolyAction
|
class DRotatePoly : public DPolyAction
|
||||||
{
|
{
|
||||||
|
@ -302,6 +281,10 @@ void DMovePoly::Serialize (FArchive &arc)
|
||||||
{
|
{
|
||||||
Super::Serialize (arc);
|
Super::Serialize (arc);
|
||||||
arc << m_Angle << m_Speed;
|
arc << m_Angle << m_Speed;
|
||||||
|
if (SaveVersion >= 4548)
|
||||||
|
{
|
||||||
|
arc << m_Speedv;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DMovePoly::DMovePoly (int polyNum)
|
DMovePoly::DMovePoly (int polyNum)
|
||||||
|
|
24
src/po_man.h
24
src/po_man.h
|
@ -5,7 +5,27 @@
|
||||||
#include "r_defs.h"
|
#include "r_defs.h"
|
||||||
#include "m_bbox.h"
|
#include "m_bbox.h"
|
||||||
|
|
||||||
class DPolyAction;
|
class DPolyAction : public DThinker
|
||||||
|
{
|
||||||
|
DECLARE_CLASS(DPolyAction, DThinker)
|
||||||
|
HAS_OBJECT_POINTERS
|
||||||
|
public:
|
||||||
|
DPolyAction(int polyNum);
|
||||||
|
void Serialize(FArchive &arc);
|
||||||
|
void Destroy();
|
||||||
|
void Stop();
|
||||||
|
double GetSpeed() const { return m_Speed; }
|
||||||
|
|
||||||
|
void StopInterpolation();
|
||||||
|
protected:
|
||||||
|
DPolyAction();
|
||||||
|
int m_PolyObj;
|
||||||
|
double m_Speed;
|
||||||
|
double m_Dist;
|
||||||
|
TObjPtr<DInterpolation> m_Interpolation;
|
||||||
|
|
||||||
|
void SetInterpolation();
|
||||||
|
};
|
||||||
|
|
||||||
struct FPolyVertex
|
struct FPolyVertex
|
||||||
{
|
{
|
||||||
|
@ -67,7 +87,7 @@ struct FPolyObj
|
||||||
int seqType;
|
int seqType;
|
||||||
double Size; // polyobj size (area of POLY_AREAUNIT == size of FRACUNIT)
|
double Size; // polyobj size (area of POLY_AREAUNIT == size of FRACUNIT)
|
||||||
FPolyNode *subsectorlinks;
|
FPolyNode *subsectorlinks;
|
||||||
DPolyAction *specialdata; // pointer to a thinker, if the poly is moving
|
TObjPtr<DPolyAction> specialdata; // pointer to a thinker, if the poly is moving
|
||||||
TObjPtr<DInterpolation> interpolation;
|
TObjPtr<DInterpolation> interpolation;
|
||||||
|
|
||||||
FPolyObj();
|
FPolyObj();
|
||||||
|
|
|
@ -76,7 +76,7 @@ const char *GetVersionString();
|
||||||
|
|
||||||
// Use 4500 as the base git save version, since it's higher than the
|
// Use 4500 as the base git save version, since it's higher than the
|
||||||
// SVN revision ever got.
|
// SVN revision ever got.
|
||||||
#define SAVEVER 4547
|
#define SAVEVER 4548
|
||||||
|
|
||||||
#define SAVEVERSTRINGIFY2(x) #x
|
#define SAVEVERSTRINGIFY2(x) #x
|
||||||
#define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x)
|
#define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x)
|
||||||
|
|
Loading…
Reference in a new issue