Randomizer
Randomizer copied to clipboard
fix viewmodels
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.
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_hViewModelmodel. - Change the class before and after SDKHook_WeaponEquip ( the issue in this line gets fixed by setting
m_iViewModelIndex).