Source Repachino stickrpghook resolver [gemenisoftware]

femto1337

Newbie
Newbie

femto1337

Newbie
Newbie
Status
Offline
Joined
Jun 27, 2019
Messages
5
Reaction score
0
C:
float AngleNormalize(float angle)
{
    angle = fmodf(angle, 360.0f);
    if (angle > 180)
    {
        angle -= 360;
    }
    if (angle < -180)
    {
        angle += 360;
    }
    return angle;
}

void Resolver::Resolver1(C_BaseEntity* entity)
{
    auto v3 = Globals::LocalPlayer;
    if (v3 != entity)
    {
        auto animstate = entity->AnimState();
        if (animstate)
        {
            // missed shot <= 2
            if (Globals::MissedShots[entity->EntIndex()] <= 2)
            {
                float speed;
                if (*(float*)(animstate + 0xF8) < 0.f)
                {
                    speed = 0.0;
                }
                else
                {
                    speed = fminf(*(DWORD*)(animstate + 0xF8), 1.0f);
                }

                float flYawModifier = (*(float*)(animstate + 0x11C) * -0.30000001 - 0.19999999) * speed;
                flYawModifier += 1.0f;

                if (*(float*)(animstate + 0xA4) > 0.0 && *(float*)(animstate + 0xFC) >= 0.0)
                    flYawModifier = fminf(*(float*)(uintptr_t(animstate) + 0xFC), 1.0f);

                float m_flMaxBodyYaw = *(float*)(uintptr_t(animstate) + 0x334) * flYawModifier;
                float m_flMinBodyYaw = *(float*)(uintptr_t(animstate) + 0x330) * flYawModifier;

                float ResolvedYaw = animstate->m_flEyeYaw;
                float delta = std::abs(animstate->m_flEyeYaw - animstate->m_flGoalFeetYaw);
                if (m_flMaxBodyYaw < delta)
                {
                    ResolvedYaw = animstate->m_flEyeYaw - std::abs(m_flMaxBodyYaw);
                }
                else if (m_flMinBodyYaw > delta)
                {
                    ResolvedYaw = animstate->m_flEyeYaw + std::abs(m_flMinBodyYaw);
                }
                animstate->m_flGoalFeetYaw = AngleNormalize(ResolvedYaw);
            }
            else
            {
                switch (Globals::MissedShots[entity->EntIndex()] % 4)
                {
                case 0:
                    animstate->m_flGoalFeetYaw += 45.0f;
                    break;
                case 1:
                    animstate->m_flGoalFeetYaw -= 45.0f;
                    break;
                case 2:
                    animstate->m_flGoalFeetYaw -= 30.0f;
                    break;
                case 3:
                    animstate->m_flGoalFeetYaw += 30.0f;
                    break;
                default:
                    break;
                }
            }
        }
    }
}
idk
 
Last edited:

nudeboyxyz

don't take .dll's from strangers
User

nudeboyxyz

don't take .dll's from strangers
User
Status
Offline
Joined
Jun 5, 2019
Messages
47
Reaction score
40
//move to yougame.biz :p
 
Top