diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-22 16:16:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-22 16:16:41 +0400 |
commit | a8592d09d0173bab0e3eb66a315146e164cf14a4 (patch) | |
tree | f73a0f025a2a673ad3d9f22273d02f72225e1e52 /source/gameengine/Ketsji/KX_GameObject.cpp | |
parent | c09b1a985c29e59736eef619e2dae1a1dcf2d73a (diff) |
BGE C++ API
Some functions used
ProcessReplica(replica);
others
replica->ProcessReplica()
Use the second method everywhere so the PyObjectPlus's ProcessReplica() can be called from its subclasses.
Note that PyObjectPlus's ProcessReplica isnt used yet.
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index eb20cfa1131..fe7f96d9fac 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -331,16 +331,16 @@ void KX_GameObject::RemoveParent(KX_Scene *scene) } } -void KX_GameObject::ProcessReplica(KX_GameObject* replica) -{ - replica->m_pPhysicsController1 = NULL; - replica->m_pGraphicController = NULL; - replica->m_pSGNode = NULL; - replica->m_pClient_info = new KX_ClientObjectInfo(*m_pClient_info); - replica->m_pClient_info->m_gameobject = replica; - replica->m_state = 0; +void KX_GameObject::ProcessReplica() +{ + m_pPhysicsController1 = NULL; + m_pGraphicController = NULL; + m_pSGNode = NULL; + m_pClient_info = new KX_ClientObjectInfo(*m_pClient_info); + m_pClient_info->m_gameobject = this; + m_state = 0; if(m_attr_dict) - replica->m_attr_dict= PyDict_Copy(m_attr_dict); + m_attr_dict= PyDict_Copy(m_attr_dict); } @@ -352,7 +352,7 @@ CValue* KX_GameObject::GetReplica() // this will copy properties and so on... CValue::AddDataToReplica(replica); - ProcessReplica(replica); + replica->ProcessReplica(); return replica; } |