diff --git a/src/game/editor/mapitems/envelope.cpp b/src/game/editor/mapitems/envelope.cpp index 172e4e84b..5f0524eb2 100644 --- a/src/game/editor/mapitems/envelope.cpp +++ b/src/game/editor/mapitems/envelope.cpp @@ -31,7 +31,7 @@ const CEnvPointBezier *CEnvelope::CEnvelopePointAccess::GetBezier(int Index) con } CEnvelope::CEnvelope(EType Type) : - m_PointsAccess(&m_vPoints), m_Type(Type) {} + m_Type(Type), m_PointsAccess(&m_vPoints) {} CEnvelope::CEnvelope(int NumChannels) : m_PointsAccess(&m_vPoints) diff --git a/src/game/editor/mapitems/envelope.h b/src/game/editor/mapitems/envelope.h index b4fcd8aa6..0d167e459 100644 --- a/src/game/editor/mapitems/envelope.h +++ b/src/game/editor/mapitems/envelope.h @@ -6,21 +6,8 @@ class CEnvelope { - class CEnvelopePointAccess : public IEnvelopePointAccess - { - std::vector *m_pvPoints; - - public: - CEnvelopePointAccess(std::vector *pvPoints); - - int NumPoints() const override; - const CEnvPoint *GetPoint(int Index) const override; - const CEnvPointBezier *GetBezier(int Index) const override; - }; - public: std::vector m_vPoints; - CEnvelopePointAccess m_PointsAccess; char m_aName[32] = ""; bool m_Synchronized = false; @@ -43,6 +30,19 @@ private: void Resort(); EType m_Type; + + class CEnvelopePointAccess : public IEnvelopePointAccess + { + std::vector *m_pvPoints; + + public: + CEnvelopePointAccess(std::vector *pvPoints); + + int NumPoints() const override; + const CEnvPoint *GetPoint(int Index) const override; + const CEnvPointBezier *GetBezier(int Index) const override; + }; + CEnvelopePointAccess m_PointsAccess; }; #endif