Randomizer icon indicating copy to clipboard operation
Randomizer copied to clipboard

fix viewmodels

Open tsuza opened this issue 2 years ago • 1 comments

Changing the player's class to the intended weapon's class and then reverting it back is not required to have correct animations. The missing piece was setting the weapon's m_iViewModelIndex.

tsuza avatar Mar 05 '23 13:03 tsuza

Maybe I should have given a better title to the PR. Yes, viewmodels currently work just fine. However: Setting the weapon's model and setting the weapon's m_iViewModelIndex on top of setting m_nCustomViewmodelModelIndex removes the need to:

  • Set the player's m_hViewModel model.
  • Change the class before and after SDKHook_WeaponEquip ( the issue in this line gets fixed by setting m_iViewModelIndex ).

tsuza avatar Mar 05 '23 15:03 tsuza