diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 5 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.h | 1 |
3 files changed, 2 insertions, 10 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index f52ee0c42c3..91488eb684a 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -165,7 +165,6 @@ KX_GameObject::~KX_GameObject() if (m_actionManager) { - KX_GetActiveScene()->RemoveAnimatedObject(this); delete m_actionManager; } @@ -413,7 +412,7 @@ BL_ActionManager* KX_GameObject::GetActionManager() // We only want to create an action manager if we need it if (!m_actionManager) { - KX_GetActiveScene()->AddAnimatedObject(this); + GetScene()->AddAnimatedObject(this); m_actionManager = new BL_ActionManager(this); } return m_actionManager; @@ -482,8 +481,7 @@ void KX_GameObject::ProcessReplica() m_pSGNode = NULL; m_pClient_info = new KX_ClientObjectInfo(*m_pClient_info); m_pClient_info->m_gameobject = this; - if (m_actionManager) - m_actionManager = new BL_ActionManager(this); + m_actionManager = NULL; m_state = 0; KX_Scene* scene = KX_GetActiveScene(); diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index adc0aa194af..8bb9eaeef10 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -1558,11 +1558,6 @@ void KX_Scene::AddAnimatedObject(CValue* gameobj) m_animatedlist->Add(gameobj); } -void KX_Scene::RemoveAnimatedObject(CValue* gameobj) -{ - m_animatedlist->RemoveValue(gameobj); -} - void KX_Scene::UpdateAnimations(double curtime) { // Update any animations diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index 29473949535..632e1bf9b50 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -339,7 +339,6 @@ public: void* meshob, bool use_gfx, bool use_phys); void AddAnimatedObject(CValue* gameobj); - void RemoveAnimatedObject(CValue* gameobj); /** * \section Logic stuff |