Fixed Renderer trying to play animations when there is no animation component

This commit is contained in:
2015-10-21 15:35:57 +02:00
parent 9b8546abb2
commit 2df78e011a
+4 -6
View File
@@ -361,13 +361,11 @@ public:
job.ModelMatrix = modelMatrix * model->m_Matrix;
job.Color = modelComponent->Color;
if (model->m_Skeleton != nullptr) {
if (model->m_Skeleton != nullptr && animationComponent != nullptr) {
job.Skeleton = model->m_Skeleton;
if (animationComponent != nullptr) {
job.AnimationName = animationComponent->Name;
job.AnimationTime = animationComponent->Time;
job.NoRootMotion = animationComponent->NoRootMotion;
}
job.AnimationName = animationComponent->Name;
job.AnimationTime = animationComponent->Time;
job.NoRootMotion = animationComponent->NoRootMotion;
}
m_RendererQueue.Deferred.Add(job);