File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ static const float p_spin0_factor = 0.0f;
3030static const float p_spin1_factor = 0 .2f ;
3131static const float p_shoulder_factor = 0 .7f ;
3232static const float p_head_factor = 0 .1f ;
33+ static const float p_head_unarmed_factor = 0 .9f ;
3334static const float r_spin0_factor = 0 .3f ;
3435static const float r_spin1_factor = 0 .3f ;
3536static const float r_shoulder_factor = 0 .2f ;
@@ -86,7 +87,8 @@ void CActor::HeadCallback(CBoneInstance* B)
8687 VERIFY (A);
8788 Fmatrix spin;
8889 float bone_yaw = angle_normalize_signed (A->r_torso .yaw - A->r_model_yaw - A->r_model_yaw_delta ) * y_head_factor;
89- float bone_pitch = angle_normalize_signed (A->r_torso .pitch ) * p_head_factor;
90+ float correctedHeadFactor = A->inventory ().GetActiveSlot () == NO_ACTIVE_SLOT ? p_head_unarmed_factor : p_head_factor;
91+ float bone_pitch = angle_normalize_signed (A->cam_Active ()->GetWorldPitch ()) * correctedHeadFactor;
9092 float bone_roll = angle_normalize_signed (A->r_torso .roll ) * r_head_factor;
9193 Fvector c = B->mTransform .c ;
9294 spin.setXYZ (-bone_pitch, bone_yaw, bone_roll);
You can’t perform that action at this time.
0 commit comments