diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-06-29 05:05:12 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-06-29 05:05:12 +0400 |
commit | de3c95a09c9eb82b04da4345c98eb53030342af8 (patch) | |
tree | 1bd6d5e617e7dff38bbb1dbc7d8eda54645ec9f8 /source/gameengine/Converter/BL_DeformableGameObject.cpp | |
parent | caef67eb923e37accdbb0664f90c99fe928406c2 (diff) |
BGE Animations: Adding blendin for Shape Actions.
Diffstat (limited to 'source/gameengine/Converter/BL_DeformableGameObject.cpp')
-rw-r--r-- | source/gameengine/Converter/BL_DeformableGameObject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/gameengine/Converter/BL_DeformableGameObject.cpp b/source/gameengine/Converter/BL_DeformableGameObject.cpp index bfba054d0d4..58294f2940e 100644 --- a/source/gameengine/Converter/BL_DeformableGameObject.cpp +++ b/source/gameengine/Converter/BL_DeformableGameObject.cpp @@ -87,15 +87,15 @@ bool BL_DeformableGameObject::SetActiveAction(BL_ShapeActionActuator *act, short bool BL_DeformableGameObject::GetShape(vector<float> &shape) { shape.clear(); - if (m_pDeformer) + BL_ShapeDeformer* shape_deformer = dynamic_cast<BL_ShapeDeformer*>(m_pDeformer); + if (shape_deformer) { - Mesh* mesh = ((BL_MeshDeformer*)m_pDeformer)->GetMesh(); // this check is normally superfluous: a shape deformer can only be created if the mesh // has relative keys - if (mesh && mesh->key && mesh->key->type==KEY_RELATIVE) + if (shape_deformer->GetKey() && shape_deformer->GetKey()->type==KEY_RELATIVE) { KeyBlock *kb; - for (kb = (KeyBlock*)mesh->key->block.first; kb; kb = (KeyBlock*)kb->next) + for (kb = (KeyBlock*)shape_deformer->GetKey()->block.first; kb; kb = (KeyBlock*)kb->next) { shape.push_back(kb->curval); } |