@@ -205,13 +205,10 @@ static void game_blend_poses(bPose *dst, bPose *src, float srcweight, short mode
205
205
BL_ArmatureObject::BL_ArmatureObject (void *sgReplicationInfo,
206
206
SG_Callbacks callbacks,
207
207
Object *armature,
208
- Scene *scene,
209
- int vert_deform_type)
208
+ Scene *scene)
210
209
:KX_GameObject(sgReplicationInfo, callbacks),
211
210
m_scene(scene),
212
211
m_lastframe(0.0 ),
213
- m_timestep(0.040 ),
214
- m_vert_deform_type(vert_deform_type),
215
212
m_drawDebug(false ),
216
213
m_lastapplyframe(0.0 )
217
214
{
@@ -424,9 +421,6 @@ bool BL_ArmatureObject::UnlinkObject(SCA_IObject *clientobj)
424
421
425
422
void BL_ArmatureObject::ApplyPose () // TODO: bouger dans SetPoseByAction ?
426
423
{
427
- // in the GE, we use ctime to store the timestep
428
- m_objArma->pose ->ctime = (float )m_timestep;
429
- // m_scene->r.cfra++;
430
424
if (m_lastapplyframe != m_lastframe) {
431
425
// update the constraint if any, first put them all off so that only the active ones will be updated
432
426
for (BL_ArmatureConstraint *constraint : m_controlledConstraints) {
@@ -457,8 +451,10 @@ void BL_ArmatureObject::BlendInPose(bPose *blend_pose, float weight, short mode)
457
451
bool BL_ArmatureObject::UpdateTimestep (double curtime)
458
452
{
459
453
if (curtime != m_lastframe) {
460
- // compute the timestep for the underlying IK algorithm
461
- m_timestep = curtime - m_lastframe;
454
+ /* Compute the timestep for the underlying IK algorithm,
455
+ * in the GE, we use ctime to store the timestep.
456
+ */
457
+ m_objArma->pose ->ctime = (float )(curtime - m_lastframe);
462
458
m_lastframe = curtime;
463
459
}
464
460
@@ -474,9 +470,9 @@ Object *BL_ArmatureObject::GetOrigArmatureObject()
474
470
return m_origObjArma;
475
471
}
476
472
477
- int BL_ArmatureObject::GetVertDeformType ()
473
+ int BL_ArmatureObject::GetVertDeformType () const
478
474
{
479
- return m_vert_deform_type ;
475
+ return ((bArmature *)m_objArma-> data )-> gevertdeformer ;
480
476
}
481
477
482
478
void BL_ArmatureObject::GetPose (bPose **pose) const
0 commit comments