What's new

Welcome to HvH Forum!

SignUp Now! Download Free HvH CS:GO Cheats, CFG, LUA/JS Scripts, And More!


SignUp Now!

Source Code Onetap v2 animation layer resolver (spoonfeed / paste ready)

Moderator
User ID
1097
Messages
81
Reactions
458
Level
54
I've seen this resolver posted all over yougame with users claiming it to be selfcode, it being from gamesense or just completely butchered code.
As far as I know onetap v3 does not have this animlayer resolver mode for moving players, the reason for this is unknown but it might be due to sharklaser joining the devteam (he has called animlayers useless for resolving on UC)

The following is code reconstructed from the onetap v2 pseudocode. Although you need a couple prerequesites for this to work properly:
- Backtrack / lagcomp system to get last tick
- Reanimated animlayers for the m_flFootYaw +60 and -60 (read more: )
- store side since updates to these are very scare in current ver

C++:
        //Inside of your animation fix (framestagenotify hook)
        if ( record->m_pEntity->m_vecVelocity ( ).length_2d ( ) <= 0.1 /* You could figure this out by using animation weight instead of using client side interpolated data from sourcengine but onetap be onetap xd */ ) {
            //player is standing, do your standing resolver routine, OTV2's routine:
            float difference = AngleDiff ( eyeYaw, record->animstate->m_flFootYaw );
            desyncSide = 2 * difference <= 0.0f ? 1 : -1;
        }
        else
        {
            //player is moving
            //check if we have a previous record stored we can compare to, if we are currently running animations related to body lean and check if the movement speed (movement layer playback rate) of both records match
            if ( previousrecord && !( ( int ) record->animationLayers [ ANIMATION_LAYER_LEAN ].weight * 1000.f ) && ( ( int ) record->animationLayers [ ANIMATION_LAYER_MOVEMENT_MOVE ].weight * 1000.f ) == ( ( int ) previousrecord->animationLayers [ ANIMATION_LAYER_MOVEMENT_MOVE ].weight * 1000.f ) ) {

                //We can get data from the animation layers, continue.

                auto processedAnimationSpeed = abs ( record->animationLayers [ ANIMATION_LAYER_MOVEMENT_MOVE ].fPlaybackRate - record->processedLayer [ ANIMATION_LAYER_MOVEMENT_MOVE ].fPlaybackRate ); // <-- compare networked layer to processed layer
                auto positiveAnimationSpeed = abs ( record->animationLayers [ ANIMATION_LAYER_MOVEMENT_MOVE ].fPlaybackRate - record->lerpedLayerPositive [ ANIMATION_LAYER_MOVEMENT_MOVE ].fPlaybackRate ); // <-- compare networked layer to processed layer w/ m_flFootYaw lerped with positive delta
                auto negativeAnimationSpeed = abs ( record->animationLayers [ ANIMATION_LAYER_MOVEMENT_MOVE ].fPlaybackRate - record->lerpedLayerNegative [ ANIMATION_LAYER_MOVEMENT_MOVE ].fPlaybackRate ); // <-- compare networked layer to processed layer w/ m_flFootYaw lerped with negative delta


                if ( processedAnimationSpeed < positiveAnimationSpeed || negativeAnimationSpeed <= positiveAnimationSpeed || ( signed int ) ( float ) ( positiveAnimationSpeed * 1000.0 ) )
                {
                    if ( processedAnimationSpeed >= negativeAnimationSpeed && positiveAnimationSpeed > negativeAnimationSpeed && !( signed int ) ( float ) ( negativeAnimationSpeed * 1000.0 ) )
                    {
                        // Success, record is desyncing towards positive yaw
                        desyncSide = 1;
                    }
                }
                else
                {
                    // record is desyncing towards negative yaw
                    desyncSide = -1;
                }
            }
        }
 
Last edited:
Member
User ID
10230
Messages
2
Reactions
51
Level
10
Sad i can't use it for onetap v3.
 
New member
User ID
5861
Messages
2
Reactions
0
Level
0
can you spoonfeed this into lw v3 im too retarded lmao, ty
 
Moderator
User ID
1097
Messages
81
Reactions
458
Level
54
can you spoonfeed this into lw v3 im too retarded lmao, ty
If you cant put this into legendware I suggest you learn more c++ or alternatively get a p2c.
 
quantumware
Moderator
User ID
4
Messages
29
Reactions
339
Level
41
I've seen this resolver posted all over yougame with users claiming it to be selfcode, it being from gamesense or just completely butchered code.
As far as I know onetap v3 does not have this animlayer resolver mode for moving players, the reason for this is unknown but it might be due to sharklaser joining the devteam (he has called animlayers useless for resolving on UC)

The following is code reconstructed from the onetap v2 pseudocode. Although you need a couple prerequesites for this to work properly:
- Backtrack / lagcomp system to get last tick
- Reanimated animlayers for the m_flFootYaw +60 and -60 (read more: )
- store side since updates to these are very scare in current ver

C++:
        //Inside of your animation fix (framestagenotify hook)
        if ( record->m_pEntity->m_vecVelocity ( ).length_2d ( ) <= 0.1 /* You could figure this out by using animation weight instead of using client side interpolated data from sourcengine but onetap be onetap xd */ ) {
            //player is standing, do your standing resolver routine, OTV2's routine:
            float difference = AngleDiff ( eyeYaw, record->animstate->m_flFootYaw );
            desyncSide = 2 * difference <= 0.0f ? 1 : -1;
        }
        else
        {
            //player is moving
            //check if we have a previous record stored we can compare to, if we are currently running animations related to body lean and check if the movement speed (movement layer playback rate) of both records match
            if ( previousrecord && !( ( int ) record->animationLayers [ ANIMATION_LAYER_LEAN ].weight * 1000.f ) && ( ( int ) record->animationLayers [ ANIMATION_LAYER_MOVEMENT_MOVE ].weight * 1000.f ) == ( ( int ) previousrecord->animationLayers [ ANIMATION_LAYER_MOVEMENT_MOVE ].weight * 1000.f ) ) {

                //We can get data from the animation layers, continue.

                auto processedAnimationSpeed = abs ( record->animationLayers [ ANIMATION_LAYER_MOVEMENT_MOVE ].fPlaybackRate - record->processedLayer [ ANIMATION_LAYER_MOVEMENT_MOVE ].fPlaybackRate ); // <-- compare networked layer to processed layer
                auto positiveAnimationSpeed = abs ( record->animationLayers [ ANIMATION_LAYER_MOVEMENT_MOVE ].fPlaybackRate - record->lerpedLayerPositive [ ANIMATION_LAYER_MOVEMENT_MOVE ].fPlaybackRate ); // <-- compare networked layer to processed layer w/ m_flFootYaw lerped with positive delta
                auto negativeAnimationSpeed = abs ( record->animationLayers [ ANIMATION_LAYER_MOVEMENT_MOVE ].fPlaybackRate - record->lerpedLayerNegative [ ANIMATION_LAYER_MOVEMENT_MOVE ].fPlaybackRate ); // <-- compare networked layer to processed layer w/ m_flFootYaw lerped with negative delta


                if ( processedAnimationSpeed < positiveAnimationSpeed || negativeAnimationSpeed <= positiveAnimationSpeed || ( signed int ) ( float ) ( positiveAnimationSpeed * 1000.0 ) )
                {
                    if ( processedAnimationSpeed >= negativeAnimationSpeed && positiveAnimationSpeed > negativeAnimationSpeed && !( signed int ) ( float ) ( negativeAnimationSpeed * 1000.0 ) )
                    {
                        // Success, record is desyncing towards positive yaw
                        desyncSide = 1;
                    }
                }
                else
                {
                    // record is desyncing towards negative yaw
                    desyncSide = -1;
                }
            }
        }
definition for processedLayer, lerpedLayerPositive, lerpedLayerNegative?
 
Moderator
User ID
1097
Messages
81
Reactions
458
Level
54
definition for processedLayer, lerpedLayerPositive, lerpedLayerNegative?
How to generate the desired layers is an exercise left to the reader. All information required is here.
 
quantumware
Moderator
User ID
4
Messages
29
Reactions
339
Level
41
How to generate the desired layers is an exercise left to the reader. All information required is here.
already got it 20 minutes after that post i created.
 
New member
User ID
15758
Messages
2
Reactions
0
Level
4
the "paste ready" got me :ROFLMAO:
It litterally is paste ready, you're just to retarded to actually paste it into your source and change the shit to be compatiable with your source.

You probably expected it was spoonfeed for your shitty lw paste.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

  • Tags
    animationlayer animlayer onetapv2 resolver spoonfeed
  • Top