@@ -326,11 +326,11 @@ void CActor::g_SetAnimation(u32 mstate_rl, bool force)
326
326
{
327
327
if (m_current_legs || m_current_torso)
328
328
{
329
- // SActorState* ST = 0;
330
- // if (mstate_rl & mcCrouch)
331
- // ST = &m_anims->m_crouch;
332
- // else
333
- // ST = &m_anims->m_normal;
329
+ SActorState* ST = 0 ;
330
+ if (mstate_rl & mcCrouch)
331
+ ST = &m_anims->m_crouch ;
332
+ else
333
+ ST = &m_anims->m_normal ;
334
334
mstate_real = 0 ;
335
335
m_current_legs.invalidate ();
336
336
m_current_torso.invalidate ();
@@ -514,6 +514,9 @@ void CActor::g_SetAnimation(u32 mstate_rl, bool force)
514
514
default : M_torso = TW->moving [moving_idx]; break ;
515
515
}
516
516
}
517
+
518
+ if (!M_torso)
519
+ M_torso = ST->m_torso [4 ].moving [moving_idx]; // Alundaio: Fix torso animations for binoc
517
520
}
518
521
else if (M)
519
522
{
@@ -560,10 +563,12 @@ void CActor::g_SetAnimation(u32 mstate_rl, bool force)
560
563
}
561
564
}
562
565
}
566
+ else if (!m_bAnimTorsoPlayed)
567
+ M_torso = ST->m_torso [4 ].moving [moving_idx]; // Alundaio: Fix torso animations for no weapon
563
568
}
564
569
565
570
// XXX: check why 'mid' was unused
566
- // MotionID mid = smart_cast<IKinematicsAnimated*>(Visual())->ID_Cycle("norm_idle_0");
571
+ MotionID mid = smart_cast<IKinematicsAnimated*>(Visual ())->ID_Cycle (" norm_idle_0" );
567
572
568
573
if (!M_legs)
569
574
{
@@ -627,14 +632,6 @@ void CActor::g_SetAnimation(u32 mstate_rl, bool force)
627
632
628
633
m_current_legs = M_legs;
629
634
630
- if (m_firstPersonBody) // Yohji: hacky way to force bones to render correctly on load
631
- {
632
- if (m_current_legs_blend)
633
- PlayMotionByParts (m_firstPersonBody->dcast_PKinematicsAnimated (), m_current_legs_blend->motionID , TRUE , legs_play_callback, this );
634
- else
635
- PlayMotionByParts (m_firstPersonBody->dcast_PKinematicsAnimated (), M_legs, TRUE , legs_play_callback, this );
636
- }
637
-
638
635
CStepManager::on_animation_start (M_legs, m_current_legs_blend);
639
636
}
640
637
0 commit comments