#include "xdynentitydef.h"

XDynEntityDef::XDynEntityDef()
    : XAsset()
    , mType()
    , mPose()
    , mModel()
    , mBrushModel(0)
    , mPhysicsBrushModel(0)
    , mDestroyFx()
    , mDestroyPieces()
    , mPhysPreset()
    , mHealth(0)
    , mMass()
    , mContents(0)
{
    
}

XDynEntityDef::~XDynEntityDef()
{
    
}

void XDynEntityDef::ParseData(QDataStream *aStream)
{
    if (GetPtr())
    {
        *aStream >> mType;

        mPose.ParseData(aStream);
        mModel.ParsePtr(aStream, false);

        *aStream
            >> mBrushModel
            >> mPhysicsBrushModel;

        mDestroyFx.ParsePtr(aStream, false);
        mDestroyPieces.ParsePtr(aStream, false);
        mPhysPreset.ParsePtr(aStream, false);

        *aStream >> mHealth;

        mMass.ParseData(aStream);

        *aStream >> mContents;

        mModel.ParseData(aStream);
        mDestroyFx.ParseData(aStream);
        mDestroyPieces.ParseData(aStream);
        mPhysPreset.ParseData(aStream);
    }
}

void XDynEntityDef::Clear()
{
    
}
