Fixes several minor initialization issues that were causing problems with deletion/management of components and entities.

Also makes the ThirdPersonPlayer game object editor selectable again by removing an erroneously set field.
This commit is contained in:
Areloch 2016-05-31 12:51:23 -05:00
parent bbf7865a77
commit 2464b620ba
7 changed files with 46 additions and 9 deletions

View file

@ -149,6 +149,8 @@ bool AnimationComponent::onAdd()
void AnimationComponent::onRemove()
{
Parent::onRemove();
mOwnerRenderInst = NULL;
}
void AnimationComponent::onComponentAdd()
@ -387,7 +389,7 @@ S32 AnimationComponent::getThreadSequenceID(S32 slot)
void AnimationComponent::updateThread(Thread& st)
{
if (!mOwnerShapeInstance)
if (!mOwnerRenderInst)
return;
switch (st.state)
@ -628,7 +630,7 @@ void AnimationComponent::startSequenceSound(Thread& thread)
void AnimationComponent::advanceThreads(F32 dt)
{
if (!mOwnerShapeInstance)
if (!mOwnerRenderInst)
return;
for (U32 i = 0; i < MaxScriptThreads; i++)