diff --git a/apps/openmw/mwworld/refdata.cpp b/apps/openmw/mwworld/refdata.cpp index ebc38ac9b..de26d1292 100644 --- a/apps/openmw/mwworld/refdata.cpp +++ b/apps/openmw/mwworld/refdata.cpp @@ -238,7 +238,7 @@ namespace MWWorld bool RefData::hasChanged() const { - return mChanged; + return mChanged || !mAnimationState.empty(); } bool RefData::activate() diff --git a/components/esm/animationstate.cpp b/components/esm/animationstate.cpp index 52dde258f..79dcad757 100644 --- a/components/esm/animationstate.cpp +++ b/components/esm/animationstate.cpp @@ -5,6 +5,11 @@ namespace ESM { + bool AnimationState::empty() const + { + return mScriptedAnims.empty(); + } + void AnimationState::load(ESMReader& esm) { mScriptedAnims.clear(); diff --git a/components/esm/animationstate.hpp b/components/esm/animationstate.hpp index 73b6a41d0..ce2c437df 100644 --- a/components/esm/animationstate.hpp +++ b/components/esm/animationstate.hpp @@ -26,6 +26,8 @@ namespace ESM typedef std::vector ScriptedAnimations; ScriptedAnimations mScriptedAnims; + bool empty() const; + void load(ESMReader& esm); void save(ESMWriter& esm) const; };