Conversation
FortyTwoFortyTwo
left a comment
There was a problem hiding this comment.
What exactly is there fixed from current? Is it just setting m_iViewModelIndex correctly as intended?
| ViewModels_UpdateArms(iClient, iWeapon); // Set arms for the weapon were about to equip | ||
|
|
||
| //Change class before equipping the weapon, otherwise anims and reload times are odd | ||
| SetClientClass(iClient, TF2_GetDefaultClassFromItem(iWeapon)); |
There was a problem hiding this comment.
This fix was added before the whole viewmodel update. While most anims and reload times does seems to have fixed itself from the update, It's however still needed for the first draw animation (along with ViewModels_UpdateArms in this hook). Comment could've been updated to reflect this current situation, or whenever if there is another solution to fix this without needing a class change.
There was a problem hiding this comment.
I didn't see any changes after removing it. Any weapons in particular that get affected by it?
There was a problem hiding this comment.
Any weapons, only happens when switching to it for the first time.
2023-03-05.18-51-57.mp4
|
Maybe I should have given a better title to the PR. Yes, viewmodels currently work just fine. However:
|
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.