浏览代码

Animation Editor: Creating Motion Sets does not increment them correctly (#4368)

Signed-off-by: Benjamin Jillich <[email protected]>
Benjamin Jillich 4 年之前
父节点
当前提交
acea5b7da8
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      Gems/EMotionFX/Code/EMotionFX/Source/MotionSet.cpp

+ 5 - 3
Gems/EMotionFX/Code/EMotionFX/Source/MotionSet.cpp

@@ -726,10 +726,12 @@ namespace EMotionFX
     {
         MCore::LockGuardRecursive lock(m_mutex);
 
-        return AZStd::accumulate(begin(m_childSets), end(m_childSets), size_t{0}, [](size_t total, const MotionSet* motionSet)
+        size_t result = 0;
+        for (const MotionSet* motionSet : m_childSets)
         {
-            return total + motionSet->GetIsOwnedByRuntime();
-        });
+            result += !motionSet->GetIsOwnedByRuntime();
+        }
+        return result;
     }