Fixes: Parse data from XDataStream
This commit is contained in:
parent
ecb0e528c2
commit
c7291b567f
@ -11,6 +11,7 @@ XCLeaf::XCLeaf()
|
||||
, mLeafBrushNode(0)
|
||||
, mCluster(0)
|
||||
{
|
||||
SetName("C Leaf");
|
||||
}
|
||||
|
||||
XCLeaf::~XCLeaf()
|
||||
@ -18,91 +19,31 @@ XCLeaf::~XCLeaf()
|
||||
|
||||
}
|
||||
|
||||
void XCLeaf::ParseData(QDataStream *aStream) {
|
||||
void XCLeaf::ParseData(XDataStream *aStream) {
|
||||
if (GetPtr() == -1) {
|
||||
*aStream
|
||||
>> mFirstCollAabbIndex
|
||||
>> mCollAabbCount
|
||||
>> mBrushContents
|
||||
>> mTerrainContents
|
||||
>> mMins[0]
|
||||
>> mMins[1]
|
||||
>> mMins[2]
|
||||
>> mMaxs[0]
|
||||
>> mMaxs[1]
|
||||
>> mMaxs[2]
|
||||
>> mLeafBrushNode
|
||||
>> mCluster;
|
||||
mFirstCollAabbIndex = aStream->ParseUInt32(QString("%1 first collision AABB index").arg(GetName()));
|
||||
mCollAabbCount = aStream->ParseUInt32(QString("%1 collision AABB count").arg(GetName()));
|
||||
mBrushContents = aStream->ParseInt32(QString("%1 brush contents").arg(GetName()));
|
||||
mTerrainContents = aStream->ParseInt32(QString("%1 terrain contents").arg(GetName()));
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
mMins[i] = aStream->ParseSingle(QString("%1 min %2").arg(GetName()).arg(i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
mMaxs[i] = aStream->ParseSingle(QString("%1 max %2").arg(GetName()).arg(i));
|
||||
}
|
||||
|
||||
mLeafBrushNode = aStream->ParseInt32(QString("%1 leaf brush node").arg(GetName()));
|
||||
mCluster = aStream->ParseInt16(QString("%1 cluster").arg(GetName()));
|
||||
|
||||
aStream->skipRawData(2);
|
||||
}
|
||||
}
|
||||
|
||||
quint32 XCLeaf::GetFirstCollAabbIndex() const {
|
||||
return mFirstCollAabbIndex;
|
||||
void XCLeaf::Clear()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XCLeaf::SetFirstCollAabbIndex(quint32 index) {
|
||||
mFirstCollAabbIndex = index;
|
||||
}
|
||||
|
||||
quint32 XCLeaf::GetCollAabbCount() const {
|
||||
return mCollAabbCount;
|
||||
}
|
||||
|
||||
void XCLeaf::SetCollAabbCount(quint32 count) {
|
||||
mCollAabbCount = count;
|
||||
}
|
||||
|
||||
int XCLeaf::GetBrushContents() const {
|
||||
return mBrushContents;
|
||||
}
|
||||
|
||||
void XCLeaf::SetBrushContents(int contents) {
|
||||
mBrushContents = contents;
|
||||
}
|
||||
|
||||
int XCLeaf::GetTerrainContents() const {
|
||||
return mTerrainContents;
|
||||
}
|
||||
|
||||
void XCLeaf::SetTerrainContents(int contents) {
|
||||
mTerrainContents = contents;
|
||||
}
|
||||
|
||||
QVector<float> XCLeaf::GetMins() const {
|
||||
return mMins;
|
||||
}
|
||||
|
||||
void XCLeaf::SetMins(QVector<float> aMins) {
|
||||
mMins = aMins;
|
||||
}
|
||||
|
||||
QVector<float> XCLeaf::GetMaxs() const {
|
||||
return mMaxs;
|
||||
}
|
||||
|
||||
void XCLeaf::SetMaxs(QVector<float> aMaxs) {
|
||||
mMaxs = aMaxs;
|
||||
}
|
||||
|
||||
int XCLeaf::GetLeafBrushNode() const {
|
||||
return mLeafBrushNode;
|
||||
}
|
||||
|
||||
void XCLeaf::SetLeafBrushNode(int node) {
|
||||
mLeafBrushNode = node;
|
||||
}
|
||||
|
||||
qint16 XCLeaf::GetCluster() const {
|
||||
return mCluster;
|
||||
}
|
||||
|
||||
void XCLeaf::SetCluster(qint16 cluster) {
|
||||
mCluster = cluster;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user