From 2df78e011af58e26fa35eff59dda1d0da17448dd Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Wed, 21 Oct 2015 15:35:57 +0200 Subject: [PATCH] Fixed Renderer trying to play animations when there is no animation component --- include/Core/Engine.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/Core/Engine.h b/include/Core/Engine.h index 5a18f00..c98c509 100755 --- a/include/Core/Engine.h +++ b/include/Core/Engine.h @@ -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);