Administrator
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
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:
You must be registered for see links
)- 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: