mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Do not use architecture dependent type size_t in esm format (Fixes #3633)
This commit is contained in:
parent
c326564e20
commit
505250f6ec
2 changed files with 14 additions and 2 deletions
|
@ -21,7 +21,18 @@ namespace ESM
|
|||
anim.mGroup = esm.getHString();
|
||||
esm.getHNOT(anim.mTime, "TIME");
|
||||
esm.getHNOT(anim.mAbsolute, "ABST");
|
||||
esm.getHNT(anim.mLoopCount, "COUN");
|
||||
|
||||
esm.getSubNameIs("COUN");
|
||||
// workaround bug in earlier version where size_t was used
|
||||
esm.getSubHeader();
|
||||
if (esm.getSubSize() == 8)
|
||||
esm.getT(anim.mLoopCount);
|
||||
else
|
||||
{
|
||||
uint32_t loopcount;
|
||||
esm.getT(loopcount);
|
||||
anim.mLoopCount = (uint64_t) loopcount;
|
||||
}
|
||||
|
||||
mScriptedAnims.push_back(anim);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
@ -20,7 +21,7 @@ namespace ESM
|
|||
std::string mGroup;
|
||||
float mTime;
|
||||
bool mAbsolute;
|
||||
size_t mLoopCount;
|
||||
uint64_t mLoopCount;
|
||||
};
|
||||
|
||||
typedef std::vector<ScriptedAnimation> ScriptedAnimations;
|
||||
|
|
Loading…
Reference in a new issue