Skip to content

Commit

Permalink
Fix empty hand orientation in left-handed mode
Browse files Browse the repository at this point in the history
  • Loading branch information
fholger committed Aug 29, 2023
1 parent 0d62c28 commit c9e1109
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/CryGame C++/Solution1/CryGame/XPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5064,14 +5064,14 @@ void CPlayer::OnDraw(const SRendParams & _RendParams)
bool hideOffHand = GetSelectedWeapon() && (m_twoHandWeaponMode || m_stats.reloading);
if (!hideOffHand)
{
Matrix34 worldControllerTransform = GetWorldControllerTransform(m_offHand) * Matrix33::CreateRotationY(gf_PI_DIV_2);
Matrix34 worldControllerTransform = GetWorldControllerTransform(m_offHand) * Matrix33::CreateRotationY(gf_PI_DIV_2 * (m_offHand == 0 ? 1 : -1));
m_handModel[m_offHand]->Update(worldControllerTransform);
m_handModel[m_offHand]->Render(_RendParams, m_pEntity->GetPos());
}

if (!GetSelectedWeapon())
{
Matrix34 worldControllerTransform = GetWorldControllerTransform(m_mainHand) * Matrix33::CreateRotationY(-gf_PI_DIV_2);
Matrix34 worldControllerTransform = GetWorldControllerTransform(m_mainHand) * Matrix33::CreateRotationY(gf_PI_DIV_2 * (m_mainHand == 0 ? 1 : -1));
m_handModel[m_mainHand]->Update(worldControllerTransform);
m_handModel[m_mainHand]->Render(_RendParams, m_pEntity->GetPos());
}
Expand Down

0 comments on commit c9e1109

Please sign in to comment.