diff options
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r-- | source/gameengine/Converter/BL_ActionActuator.cpp | 8 | ||||
-rw-r--r-- | source/gameengine/Converter/BL_ArmatureChannel.cpp | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index abc45293542..1bfe5945bbc 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -144,6 +144,7 @@ void BL_ActionActuator::SetLocalTime(float curtime) case ACT_ACTION_PLAY: // Clamp m_localtime = m_endframe; + ((KX_GameObject*)GetParent())->StopAction(m_layer); break; case ACT_ACTION_LOOP_END: // Put the time back to the beginning @@ -237,14 +238,14 @@ bool BL_ActionActuator::Update(double curtime, bool frame) RemoveAllEvents(); } + // "Active" actions need to keep updating their current frame if (bUseContinue && (m_flag & ACT_FLAG_ACTIVE)) - { m_localtime = obj->GetActionFrame(m_layer); - ResetStartTime(curtime); - } if (m_flag & ACT_FLAG_ATTEMPT_PLAY) SetLocalTime(curtime); + else + ResetStartTime(curtime); // Handle a frame property if it's defined if ((m_flag & ACT_FLAG_ACTIVE) && m_framepropname[0] != 0) @@ -299,6 +300,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame) else if ((m_flag & ACT_FLAG_ACTIVE) && bNegativeEvent) { m_flag &= ~ACT_FLAG_ATTEMPT_PLAY; + m_localtime = obj->GetActionFrame(m_layer); bAction *curr_action = obj->GetCurrentAction(m_layer); if (curr_action && curr_action != m_action) { diff --git a/source/gameengine/Converter/BL_ArmatureChannel.cpp b/source/gameengine/Converter/BL_ArmatureChannel.cpp index 1da4b388823..c463068d52c 100644 --- a/source/gameengine/Converter/BL_ArmatureChannel.cpp +++ b/source/gameengine/Converter/BL_ArmatureChannel.cpp @@ -295,7 +295,7 @@ PyObject* BL_ArmatureChannel::py_attr_get_joint_rotation(void *self_v, const str mul_v3_fl(joints,norm); break; } - return newVectorObject(joints, 3, Py_NEW, NULL); + return Vector_CreatePyObject(joints, 3, Py_NEW, NULL); } int BL_ArmatureChannel::py_attr_set_joint_rotation(void *self_v, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) @@ -434,7 +434,7 @@ PyAttributeDef BL_ArmatureBone::AttributesPtr[] = { KX_PYATTRIBUTE_FLOAT_VECTOR_RO("arm_head",Bone,arm_head,3), KX_PYATTRIBUTE_FLOAT_VECTOR_RO("arm_tail",Bone,arm_tail,3), KX_PYATTRIBUTE_FLOAT_MATRIX_RO("arm_mat",Bone,arm_mat,4), - KX_PYATTRIBUTE_FLOAT_MATRIX_RO("bone_mat",Bone,bone_mat,4), + KX_PYATTRIBUTE_FLOAT_MATRIX_RO("bone_mat",Bone,bone_mat,3), KX_PYATTRIBUTE_RO_FUNCTION("parent",BL_ArmatureBone,py_bone_get_parent), KX_PYATTRIBUTE_RO_FUNCTION("children",BL_ArmatureBone,py_bone_get_children), { NULL } //Sentinel |