Fixes: Parse data from XDataStream
This commit is contained in:
parent
ecb0e528c2
commit
c7291b567f
@ -11,6 +11,7 @@ XCLeaf::XCLeaf()
|
|||||||
, mLeafBrushNode(0)
|
, mLeafBrushNode(0)
|
||||||
, mCluster(0)
|
, mCluster(0)
|
||||||
{
|
{
|
||||||
|
SetName("C Leaf");
|
||||||
}
|
}
|
||||||
|
|
||||||
XCLeaf::~XCLeaf()
|
XCLeaf::~XCLeaf()
|
||||||
@ -18,91 +19,31 @@ XCLeaf::~XCLeaf()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void XCLeaf::ParseData(QDataStream *aStream) {
|
void XCLeaf::ParseData(XDataStream *aStream) {
|
||||||
if (GetPtr() == -1) {
|
if (GetPtr() == -1) {
|
||||||
*aStream
|
mFirstCollAabbIndex = aStream->ParseUInt32(QString("%1 first collision AABB index").arg(GetName()));
|
||||||
>> mFirstCollAabbIndex
|
mCollAabbCount = aStream->ParseUInt32(QString("%1 collision AABB count").arg(GetName()));
|
||||||
>> mCollAabbCount
|
mBrushContents = aStream->ParseInt32(QString("%1 brush contents").arg(GetName()));
|
||||||
>> mBrushContents
|
mTerrainContents = aStream->ParseInt32(QString("%1 terrain contents").arg(GetName()));
|
||||||
>> mTerrainContents
|
|
||||||
>> mMins[0]
|
for (int i = 0; i < 3; i++)
|
||||||
>> mMins[1]
|
{
|
||||||
>> mMins[2]
|
mMins[i] = aStream->ParseSingle(QString("%1 min %2").arg(GetName()).arg(i));
|
||||||
>> mMaxs[0]
|
}
|
||||||
>> mMaxs[1]
|
|
||||||
>> mMaxs[2]
|
for (int i = 0; i < 3; i++)
|
||||||
>> mLeafBrushNode
|
{
|
||||||
>> mCluster;
|
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);
|
aStream->skipRawData(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
quint32 XCLeaf::GetFirstCollAabbIndex() const {
|
void XCLeaf::Clear()
|
||||||
return mFirstCollAabbIndex;
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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