Weapon fixes

This commit is contained in:
eray orçunus
2020-05-16 15:07:09 +03:00
parent 793a6a6d7e
commit 40ee29fb99
7 changed files with 59 additions and 31 deletions

View File

@@ -293,9 +293,12 @@ bool
CPedIK::PointGunAtPosition(CVector const& position)
{
// TODO(MIAMI): special cases for some weapons
RwV3d armPos;
GetComponentPosition(&armPos, PED_UPPERARMR);
return PointGunInDirection(
CGeneral::GetRadianAngleBetweenPoints(position.x, position.y, m_ped->GetPosition().x, m_ped->GetPosition().y),
CGeneral::GetRadianAngleBetweenPoints(position.z, Distance2D(m_ped->GetPosition(), position.x, position.y), m_ped->GetPosition().z, 0.0f));
CGeneral::GetRadianAngleBetweenPoints(position.z, Distance2D(m_ped->GetPosition(), position.x, position.y), armPos.z, 0.0f));
}
bool