-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix viewmodels #113
base: master
Are you sure you want to change the base?
fix viewmodels #113
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.