mirror of
https://github.com/halpz/re3.git
synced 2025-03-21 16:07:32 +00:00
PedIK: fix fix
This commit is contained in:
parent
d81890f6a8
commit
285fee01f2
|
@ -205,6 +205,8 @@ CPedIK::PointGunInDirection(float targetYaw, float targetPitch)
|
||||||
else if (status == ANGLES_SET_EXACTLY)
|
else if (status == ANGLES_SET_EXACTLY)
|
||||||
m_flags |= GUN_POINTED_SUCCESSFULLY;
|
m_flags |= GUN_POINTED_SUCCESSFULLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Game uses index 2 directly, which happens to be identical to BONE_spine
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
RwMatrix *m = GetBoneMatrix(m_ped, BONE_spine);
|
RwMatrix *m = GetBoneMatrix(m_ped, BONE_spine);
|
||||||
#else
|
#else
|
||||||
|
@ -213,7 +215,7 @@ CPedIK::PointGunInDirection(float targetYaw, float targetPitch)
|
||||||
RwMatrix *m = &mats[2];
|
RwMatrix *m = &mats[2];
|
||||||
#endif
|
#endif
|
||||||
RwV3d axis = { 0.0f, 0.0f, 0.0f };
|
RwV3d axis = { 0.0f, 0.0f, 0.0f };
|
||||||
float axisangle = -CGeneral::LimitRadianAngle(Atan2(-m->up.y, -m->up.x) - m_ped->m_fRotationCur);
|
float axisangle = -CGeneral::LimitRadianAngle(Atan2(-m->at.y, -m->at.x) - m_ped->m_fRotationCur);
|
||||||
axis.y = -Sin(axisangle);
|
axis.y = -Sin(axisangle);
|
||||||
axis.z = Cos(axisangle);
|
axis.z = Cos(axisangle);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue