Newbie HvHer
- User ID
- 33897
- Messages
- 3
- Reactions
- 2
- Level
- 3
Hello! today i am going to free this shit superior pasted resik from pandora.uno(reversed it myself, some stuff might be wrong)
C++:
if (!LatestRecord.m_bIsShooting)
{
if (LatestRecord.m_UpdateDelay > 1 /*&& !(pPlayer->GetSequenceActivity(LatestRecord.m_AnimationLayers.at(ROTATE_LEFT).at(ANIMATION_LAYER_MOVEMENT_MOVE).m_nSequence) == ANIMATION_LAYER_WEAPON_ACTION)*/)
{
// if player on ground
bool bOnGround = pPlayer->m_PlayerAnimStateCSGO()->m_bOnGround && pPlayer->m_PlayerAnimStateCSGO()->m_flDurationInAir == 0.f;
float_t flLowerBodyTimer = 0.f;
// get player angle
float_t flFeetDelta = Math::AngleNormalize(Math::AngleDiff(Math::AngleNormalize(pPlayer->m_flLowerBodyYaw()), Math::AngleNormalize(pPlayer->m_angEyeAngles().yaw)));
float_t flDelta = Math::AngleDiff(pPlayer->m_angEyeAngles().yaw, pPlayer->m_PlayerAnimStateCSGO()->m_flFootYaw);
if (pPlayer->m_PlayerAnimStateCSGO()->m_vecVelocity.Length2D() > 1.0f && bOnGround) // moving
{
if (pPlayer->IsAlive())
{
if (!(pPlayer->m_fFlags() & FL_ONGROUND))
{
LatestRecord.m_RotationMode = 0;
}
LatestRecord.m_bStanding = LatestRecord.m_AnimationLayers[0][3].m_flWeight == 0.0f && LatestRecord.m_AnimationLayers[0][3].m_flCycle == 0.0f;
LatestRecord.m_bAnimating = LatestRecord.m_AnimationLayers[0][12].m_flWeight * 1000.f;
LatestRecord.m_bMoving = !LatestRecord.m_bAnimating && (LatestRecord.m_AnimationLayers[0][6].m_flWeight * 1000.f) == (PreviousRecord.m_AnimationLayers[0][6].m_flWeight * 1000.f);
if ((pPlayer->m_fFlags() & FL_ONGROUND) && (LatestRecord.m_Flags & FL_ONGROUND))
{
float m_flSpeed = pPlayer->m_vecVelocity().Length2D();
if (m_flSpeed > 1.1f)
{
if (LatestRecord.m_bMoving)
{
float_t flLeftDelta = fabsf(LatestRecord.m_AnimationLayers.at(ROTATE_LEFT).at(ANIMATION_LAYER_MOVEMENT_MOVE).m_flPlaybackRate - LatestRecord.m_AnimationLayers.at(ROTATE_SERVER).at(ANIMATION_LAYER_MOVEMENT_MOVE).m_flPlaybackRate);
float_t flLowLeftDelta = fabsf(LatestRecord.m_AnimationLayers.at(ROTATE_LOW_LEFT).at(ANIMATION_LAYER_MOVEMENT_MOVE).m_flPlaybackRate - LatestRecord.m_AnimationLayers.at(ROTATE_SERVER).at(ANIMATION_LAYER_MOVEMENT_MOVE).m_flPlaybackRate);
float_t flLowRightDelta = fabsf(LatestRecord.m_AnimationLayers.at(ROTATE_LOW_RIGHT).at(ANIMATION_LAYER_MOVEMENT_MOVE).m_flPlaybackRate - LatestRecord.m_AnimationLayers.at(ROTATE_SERVER).at(ANIMATION_LAYER_MOVEMENT_MOVE).m_flPlaybackRate);
float_t flRightDelta = fabsf(LatestRecord.m_AnimationLayers.at(ROTATE_RIGHT).at(ANIMATION_LAYER_MOVEMENT_MOVE).m_flPlaybackRate - LatestRecord.m_AnimationLayers.at(ROTATE_SERVER).at(ANIMATION_LAYER_MOVEMENT_MOVE).m_flPlaybackRate);
float_t flCenterDelta = fabsf(LatestRecord.m_AnimationLayers.at(ROTATE_CENTER).at(ANIMATION_LAYER_MOVEMENT_MOVE).m_flPlaybackRate - LatestRecord.m_AnimationLayers.at(ROTATE_SERVER).at(ANIMATION_LAYER_MOVEMENT_MOVE).m_flPlaybackRate);
LatestRecord.m_bAnimResolved = false;
{
if (flLeftDelta > flCenterDelta && flLeftDelta > flLowLeftDelta)
LatestRecord.m_RotationMode = ROTATE_LEFT;
if (flRightDelta > flCenterDelta && flRightDelta > flLowRightDelta)
LatestRecord.m_RotationMode = ROTATE_RIGHT;
if (flLowLeftDelta > flLeftDelta && flLowLeftDelta > flCenterDelta)
LatestRecord.m_RotationMode = ROTATE_LOW_LEFT;
if (flLowRightDelta > flRightDelta && flLowRightDelta > flCenterDelta)
LatestRecord.m_RotationMode = ROTATE_LOW_RIGHT;
}
LatestRecord.m_bAnimResolved = true;
}
}
}
else if (LatestRecord.m_bStanding)
{
auto m_flEyeDelta = remainderf(Math::NormalizeAngle(pPlayer->m_angEyeAngles().yaw - pPlayer->m_flLowerBodyYaw ()), 360.f) <= 0.f;
if (2 * m_flEyeDelta)
{
if (2 * m_flEyeDelta == 2)
{
LatestRecord.m_RotationMode = -1;
}
}
else
{
LatestRecord.m_RotationMode = 1;
}
}
pPlayer->m_PlayerAnimStateCSGO()->m_flFootYaw = Math::NormalizeAngle(pPlayer->m_angEyeAngles().yaw + 58.f * LatestRecord.m_RotationMode);
}
g_sdk.resolver_data.m_AnimResoled[iPlayerID] = LatestRecord.m_bAnimResolved;
// change current angle, if shot missed
if (LatestRecord.m_RotationMode == g_sdk.resolver_data.m_BruteSide[iPlayerID])
{
if (g_sdk.resolver_data.m_MissedShots[iPlayerID] > 0)
{
int iNewRotation = 0;
switch (LatestRecord.m_RotationMode)
{
case ROTATE_LEFT: iNewRotation = ROTATE_RIGHT; break;
case ROTATE_RIGHT: iNewRotation = ROTATE_LOW_RIGHT; break;
case ROTATE_LOW_RIGHT: iNewRotation = ROTATE_LOW_LEFT; break;
case ROTATE_LOW_LEFT: iNewRotation = ROTATE_LEFT; break;
}
LatestRecord.m_RotationMode = iNewRotation;
}
}