XPlor/libs/xassets/xanimnotifyinfo.cpp
njohnson 4480eb83d7 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.
2025-09-10 21:55:56 -04:00

24 lines
461 B
C++

#include "xanimnotifyinfo.h"
XAnimNotifyInfo::XAnimNotifyInfo()
: XAsset()
, mName(0)
, mTime(0.0f)
{
SetName("Animation Notify Info");
}
void XAnimNotifyInfo::ParseData(XDataStream *aStream) {
if (GetPtr() == -1) {
mName = aStream->ParseUInt32(QString("%1 name").arg(GetName()));
mTime = aStream->ParseSingle(QString("%1 time").arg(GetName()));
}
}
void XAnimNotifyInfo::Clear()
{
mName = 0;
mTime = 0.0f;
}