Merge pull request #3299 from darina/arrow-animation-blending-fix

Fixed the arrow position recovering after a routing deactivation.
This commit is contained in:
Roman Kuznetsov 2016-05-24 11:48:38 +03:00
commit 473c93b04a

View file

@ -5,8 +5,19 @@ namespace df
bool Animation::CouldBeBlendedWith(Animation const & animation) const
{
return (GetType() != animation.GetType()) &&
m_couldBeBlended && animation.m_couldBeBlended;
bool hasSameObject = false;
TAnimObjects const & objects = animation.GetObjects();
for (auto const & object : objects)
{
if (HasObject(object))
{
hasSameObject = true;
break;
}
}
return !hasSameObject || ((GetType() != animation.GetType()) &&
m_couldBeBlended && animation.m_couldBeBlended);
}
} // namespace df