Fix: Parse Animation Indices data correctly
This commit fixes the parsing of `XAnimIndices` data, ensuring that the index is correctly parsed from the data stream, including handling the case where the index pointer is -1.
This commit is contained in:
parent
2e4e0a6b99
commit
86885f999c
@ -4,21 +4,15 @@ XAnimIndices::XAnimIndices()
|
||||
: XAsset()
|
||||
, mIndex(0)
|
||||
{
|
||||
|
||||
SetName("Animation Indices");
|
||||
}
|
||||
|
||||
XAnimIndices::~XAnimIndices()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XAnimIndices::ParseData(QDataStream *aStream) {
|
||||
void XAnimIndices::ParseData(XDataStream *aStream) {
|
||||
if (GetPtr() == -1) {
|
||||
qint32 indexPtr;
|
||||
*aStream >> indexPtr;
|
||||
qint32 indexPtr = aStream->ParseInt32(QString("%1 index ptr").arg(GetName()));
|
||||
if (indexPtr == -1)
|
||||
{
|
||||
*aStream >> mIndex;
|
||||
mIndex = aStream->ParseUInt32(QString("%1 index").arg(GetName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user