Fix: Handle Animation Notify Info parsing
This commit fixes an issue in the parsing of Animation Notify Info data. Specifically, the parsing logic for `mName` and `mTime` was incorrect. The fix adds proper parsing implementation, ensuring that the data is correctly loaded during deserialization.
This commit is contained in:
parent
5ee673175c
commit
4480eb83d7
@ -5,19 +5,14 @@ XAnimNotifyInfo::XAnimNotifyInfo()
|
|||||||
, mName(0)
|
, mName(0)
|
||||||
, mTime(0.0f)
|
, mTime(0.0f)
|
||||||
{
|
{
|
||||||
|
SetName("Animation Notify Info");
|
||||||
}
|
}
|
||||||
|
|
||||||
XAnimNotifyInfo::~XAnimNotifyInfo()
|
void XAnimNotifyInfo::ParseData(XDataStream *aStream) {
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void XAnimNotifyInfo::ParseData(QDataStream *aStream) {
|
|
||||||
if (GetPtr() == -1) {
|
if (GetPtr() == -1) {
|
||||||
*aStream
|
|
||||||
>> mName
|
mName = aStream->ParseUInt32(QString("%1 name").arg(GetName()));
|
||||||
>> mTime;
|
mTime = aStream->ParseSingle(QString("%1 time").arg(GetName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,19 +21,3 @@ void XAnimNotifyInfo::Clear()
|
|||||||
mName = 0;
|
mName = 0;
|
||||||
mTime = 0.0f;
|
mTime = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
quint32 XAnimNotifyInfo::GetName() const {
|
|
||||||
return mName;
|
|
||||||
}
|
|
||||||
|
|
||||||
void XAnimNotifyInfo::SetName(quint32 name) {
|
|
||||||
mName = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
float XAnimNotifyInfo::GetTime() const {
|
|
||||||
return mTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
void XAnimNotifyInfo::SetTime(float time) {
|
|
||||||
mTime = time;
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user