Raised This Month: $51 Target: $400
 12% 

[TF2] Force third person weapon animation.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 05-24-2015 , 05:38   [TF2] Force third person weapon animation.
Reply With Quote #1

PHP Code:
new iVm GetEntPropEnt(clientIdxProp_Send"m_hViewModel");
        if (
IsValidEnt(iVm))
        {
            
SetEntProp(weaponProp_Send"m_nSequence"SB_IsAttack2[clientIdx] ? 5); // 17 is uppercut, 18 is normal
            
SetEntProp(iVmProp_Send"m_nSequence"SB_IsAttack2[clientIdx] ? 5);

            new 
m_nNewSequenceParity GetEntProp(iVmProp_Send"m_nNewSequenceParity");
            new 
m_nResetEventsParity GetEntProp(iVmProp_Send"m_nResetEventsParity");
            
SetEntProp(weaponProp_Send"m_nNewSequenceParity"m_nNewSequenceParity);
            
SetEntProp(weaponProp_Send"m_nResetEventsParity"m_nResetEventsParity);

            
SetEntProp(weaponProp_Send"m_bClientSideAnimation"0);
        } 
So I've found that:

m_nSequence on the client usually corresponds to whether they are walking/crouching/swimming/in air/etc on the playermodel.

m_nSequence on the weapon corresponds to attack animations on the player's playermodel.
m_nSequence on the viewmodel is generally the same as the weapon.

Setting IN_ATTACK during OnPlayerRunCMD animates the viewmodel fine, but not the third person weapon.

m_nNewSequenceParity and m_nResetEventsParity both increment when m_nSequence changes and loop from 0-7 0-7 0-7 again and again.

Forced attacking via IN_ATTACK does not update these Parities for the weapon, but it does for the viewmodel.

Manually setting these parities doesn't do anything... in OnPlayerRunCMD.

Is there a way to get the player to force an animation?
__________________
Chdata is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 05-26-2015 , 07:18   Re: [TF2] Force third person weapon animation.
Reply With Quote #2

You mean like on server parkour fortress?
__________________
Benoist3012 is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 05-26-2015 , 09:47   Re: [TF2] Force third person weapon animation.
Reply With Quote #3

tbh it's been forever since I went on that server, i thought it only did viewmodel animations.
__________________

Last edited by Chdata; 05-26-2015 at 09:47.
Chdata is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode