Начинающий
-
Автор темы
- #1
hello guys, we purchased this part of code from a person under the nickname sharklaser1 this part cost us 300$
C++:
void CAnimationSys::DetectMove( CheatManager::LagCompensation::CLagRecord* LagRecord, CheatManager::LagCompensation::CLagRecord* PreviousLagRecord, bool bCanSkipThisPlayer )
{
// compare animation layer movement move flWeight and nSequence.
// if current animation layer movement move flWeight > previous animation layer movement move flWeight than player is moving lol.
if ( LagRecord->m_nLayers[ SDK::Enums::AnimationLayers::ANIMATION_LAYER_MOVEMENT_MOVE ].m_flWeight > PreviousLagRecord->m_nLayers[ SDK::Enums::AnimationLayers::ANIMATION_LAYER_MOVEMENT_MOVE ].m_flWeight )
{
// compare for animation layer movement move flWeight sucessfully done!
// now compare animation layer movement move nSequence.
// if current animation layer movement move nSequence > previous animation layer movement move nSequence than player moving animation started lol.
if ( LagRecord->m_nLayers[ SDK::Enums::AnimationLayers::ANIMATION_LAYER_MOVEMENT_MOVE ].nSequence > PreviousLagRecord->m_nLayers[ SDK::Enums::AnimationLayers::ANIMATION_LAYER_MOVEMENT_MOVE ].nSequence )
{
// compare for animation layer movement move nSequence sucessfully done!
// now lets detect player moving use flPlaybackRate deltas and set resolve mode and side.
// lol i am copy resolve layers before bone setup and u need rotate player in 3 sides( pos, center, neg ).
float flPositiveDelta = LagRecord->m_nResolveLayers[ CheatManager::LagCompensation::Enums::ResolveLayers::ANIMATION_LAYER_POSITIVE ][ SDK::Enums::AnimationLayers::ANIMATION_LAYER_MOVEMENT_MOVE ].m_flPlaybackRate - LagRecord->m_nLayers[ SDK::Enums::AnimationLayers::ANIMATION_LAYER_MOVEMENT_MOVE ].m_flPlaybackRate;
float flCenterDelta = LagRecord->m_nResolveLayers[ CheatManager::LagCompensation::Enums::ResolveLayers::ANIMATION_LAYER_ZERO ][ SDK::Enums::AnimationLayers::ANIMATION_LAYER_MOVEMENT_MOVE ].m_flPlaybackRate - LagRecord->m_nLayers[ SDK::Enums::AnimationLayers::ANIMATION_LAYER_MOVEMENT_MOVE ].m_flPlaybackRate;
float flNegativeDelta = LagRecord->m_nResolveLayers[ CheatManager::LagCompensation::Enums::ResolveLayers::ANIMATION_LAYER_NEGATIVE ][ SDK::Enums::AnimationLayers::ANIMATION_LAYER_MOVEMENT_MOVE ].m_flPlaybackRate - LagRecord->m_nLayers[ SDK::Enums::AnimationLayers::ANIMATION_LAYER_MOVEMENT_MOVE ].m_flPlaybackRate;
// set bCanSkipThisPlayer if animation layer strafe change flWeight >= 1.0,
// but game use it for modify flMoveYaw and need skip this check.
if ( LagRecord->m_nLayers[ SDK::Enums::AnimationLayers::ANIMATION_LAYER_STRAFE_CHANGE ].m_flWeight >= 1.0 )
bCanSkipThisPlayer = true;
else
{
// detect positive yaw.
if ( abs( flPositiveDelta - flCenterDelta ) > 0.0 )
{
// set resolve mode and side.
// ... and maybe add logic with last delta?
LagRecord->m_nResolveMode = 1;
LagRecord->m_nResolveSide = 1;
}
// detect negative yaw.
else if ( abs( flNegativeDelta - flCenterDelta ) > 0.0 )
{
// set resolve mode and side.
// ... and maybe add logic with last delta?
LagRecord->m_nResolveMode = 1;
LagRecord->m_nResolveSide = -1;
}
}
}
else if ( bCanSkipThisPlayer && LagRecord->m_vecVelocity.Legnth2D( ) <= 1.0 )
{
// what the fuck..
DetectStand( LagRecord, PreviousLagRecord, !LagRecord->m_bMoving );
}
}
else if ( bCanSkipThisPlayer && LagRecord->m_vecVelocity.Legnth2D( ) <= 1.0 )
{
// what the fuck..
DetectStand( LagRecord, PreviousLagRecord, LagRecord->m_bMoving );
}
}