Welcome to hackvshack.net Forum!
Download Free HvH CS2/CS:GO Cheats, CFG, LUA/JS Scripts, and More!
Register

C++ Cheat Onetap v2 animation layer resolver (spoonfeed / paste ready)

viv.exe

Administrator
User ID:
1097
Messages:
148
Reactions:
212
Badges:
19
REP:
−0/0+
Level:
258
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++:
Expand Collapse Copy
        //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:
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++:
Expand Collapse Copy
        //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?
 
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.
 

Who has read this thread (Total: 0) in last 1 hours View details