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/Converter/BL_DeformableGameObject.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/Converter/BL_DeformableGameObject.cpp')
-rw-r--r-- | source/gameengine/Converter/BL_DeformableGameObject.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source/gameengine/Converter/BL_DeformableGameObject.cpp b/source/gameengine/Converter/BL_DeformableGameObject.cpp index e2610d2b405..618744dc1f3 100644 --- a/source/gameengine/Converter/BL_DeformableGameObject.cpp +++ b/source/gameengine/Converter/BL_DeformableGameObject.cpp @@ -41,16 +41,12 @@ BL_DeformableGameObject::~BL_DeformableGameObject() delete m_pDeformer; // __NLA : Temporary until we decide where to put this } -void BL_DeformableGameObject::ProcessReplica(KX_GameObject* replica) +void BL_DeformableGameObject::ProcessReplica() { - BL_MeshDeformer *deformer; - KX_GameObject::ProcessReplica(replica); - - if (m_pDeformer) { - deformer = (BL_MeshDeformer*)m_pDeformer->GetReplica(replica); - ((BL_DeformableGameObject*)replica)->m_pDeformer = deformer; - } + KX_GameObject::ProcessReplica(); + if (m_pDeformer) + m_pDeformer= (BL_MeshDeformer*)m_pDeformer->GetReplica(this); } CValue* BL_DeformableGameObject::GetReplica() @@ -61,7 +57,7 @@ CValue* BL_DeformableGameObject::GetReplica() // this will copy properties and so on... CValue::AddDataToReplica(replica); - ProcessReplica(replica); + replica->ProcessReplica(); return replica; } |