1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-26 17:41:33 +00:00

Fix animation state not saving

References with animation state changed but otherwise identical to their content file counterparts
were previously considered unchanged and thus dropped while saving.
This commit is contained in:
MiroslavR 2016-09-15 16:11:54 +02:00
parent 322a0ba8bb
commit 55e670c5fe
3 changed files with 8 additions and 1 deletions

View file

@ -238,7 +238,7 @@ namespace MWWorld
bool RefData::hasChanged() const bool RefData::hasChanged() const
{ {
return mChanged; return mChanged || !mAnimationState.empty();
} }
bool RefData::activate() bool RefData::activate()

View file

@ -5,6 +5,11 @@
namespace ESM namespace ESM
{ {
bool AnimationState::empty() const
{
return mScriptedAnims.empty();
}
void AnimationState::load(ESMReader& esm) void AnimationState::load(ESMReader& esm)
{ {
mScriptedAnims.clear(); mScriptedAnims.clear();

View file

@ -26,6 +26,8 @@ namespace ESM
typedef std::vector<ScriptedAnimation> ScriptedAnimations; typedef std::vector<ScriptedAnimation> ScriptedAnimations;
ScriptedAnimations mScriptedAnims; ScriptedAnimations mScriptedAnims;
bool empty() const;
void load(ESMReader& esm); void load(ESMReader& esm);
void save(ESMWriter& esm) const; void save(ESMWriter& esm) const;
}; };