0x01

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Mar 1, 2020
Messages
7
Reaction score
17
This guide is assuming that you have the necessary stuff (createmove hook, usercmd class etc.)

warning, this may be wrong, if it is feel free to correct me.


EDIT: UPDATED! might be slightly wrong still so please point out any errors and I'll fix it.
 
Last edited:

Aham

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Sep 2, 2019
Messages
20
Reaction score
195
Finally something worth looking at.
here is code for lby breaker.

C++:
bool UpdateLBY()
{
    auto speed = g_LocalPlayer->m_vecVelocity().Length2D();
    static float next_lby = 0.00f;
    float curtime = g_GlobalVars->curtime;

    if (!(g_LocalPlayer->m_fFlags() & FL_ONGROUND))
        return false;

    if (speed > 0.1f)
        next_lby = curtime + 0.22;

    if (next_lby < curtime)
    {
        next_lby = curtime + 1.1;
        return true;
    }
    else
        return false;
}
and you can make your micromovement better by implementing crouching speed. because it is off in the example you send. Here is code for proper standing and crouching micro-movements

C++:
if (fabsf(cmd->sidemove) < 5.0f) {
    if (cmd->buttons & IN_DUCK)
        cmd->sidemove = cmd->tick_count & 1 ? 3.25f : -3.25f;
    else
        cmd->sidemove = cmd->tick_count & 1 ? 1.1f : -1.1f;
}

have fun :)
 

sadtom

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Oct 14, 2019
Messages
16
Reaction score
14
Finally something worth looking at.
here is code for lby breaker.

C++:
bool UpdateLBY()
{
    auto speed = g_LocalPlayer->m_vecVelocity().Length2D();
    static float next_lby = 0.00f;
    float curtime = g_GlobalVars->curtime;

    if (!(g_LocalPlayer->m_fFlags() & FL_ONGROUND))
        return false;

    if (speed > 0.1f)
        next_lby = curtime + 0.22;

    if (next_lby < curtime)
    {
        next_lby = curtime + 1.1;
        return true;
    }
    else
        return false;
}
and you can make your micromovement better by implementing crouching speed. because it is off in the example you send. Here is code for proper standing and crouching micro-movements

C++:
if (fabsf(cmd->sidemove) < 5.0f) {
    if (cmd->buttons & IN_DUCK)
        cmd->sidemove = cmd->tick_count & 1 ? 3.25f : -3.25f;
    else
        cmd->sidemove = cmd->tick_count & 1 ? 1.1f : -1.1f;
}

have fun :)
thank you im going to paste in my P2C right now.
 

sadtom

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Oct 14, 2019
Messages
16
Reaction score
14
Finally something worth looking at.
here is code for lby breaker.

C++:
bool UpdateLBY()
{
    auto speed = g_LocalPlayer->m_vecVelocity().Length2D();
    static float next_lby = 0.00f;
    float curtime = g_GlobalVars->curtime;

    if (!(g_LocalPlayer->m_fFlags() & FL_ONGROUND))
        return false;

    if (speed > 0.1f)
        next_lby = curtime + 0.22;

    if (next_lby < curtime)
    {
        next_lby = curtime + 1.1;
        return true;
    }
    else
        return false;
}
and you can make your micromovement better by implementing crouching speed. because it is off in the example you send. Here is code for proper standing and crouching micro-movements

C++:
if (fabsf(cmd->sidemove) < 5.0f) {
    if (cmd->buttons & IN_DUCK)
        cmd->sidemove = cmd->tick_count & 1 ? 3.25f : -3.25f;
    else
        cmd->sidemove = cmd->tick_count & 1 ? 1.1f : -1.1f;
}

have fun :)
Wait, using micro movements + lby breaker dont make the desync worse?
 

Aham

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Sep 2, 2019
Messages
20
Reaction score
195
Wait, using micro movements + lby breaker dont make the desync worse?
I didn't say to use micro movements + lby breaker. I just gave the code for both and a more proper way of doing micro movements.
 

kabirka69

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Jan 11, 2020
Messages
4
Reaction score
0
Finally something worth looking at.
here is code for lby breaker.

C++:
bool UpdateLBY()
{
    auto speed = g_LocalPlayer->m_vecVelocity().Length2D();
    static float next_lby = 0.00f;
    float curtime = g_GlobalVars->curtime;

    if (!(g_LocalPlayer->m_fFlags() & FL_ONGROUND))
        return false;

    if (speed > 0.1f)
        next_lby = curtime + 0.22;

    if (next_lby < curtime)
    {
        next_lby = curtime + 1.1;
        return true;
    }
    else
        return false;
}
and you can make your micromovement better by implementing crouching speed. because it is off in the example you send. Here is code for proper standing and crouching micro-movements

C++:
if (fabsf(cmd->sidemove) < 5.0f) {
    if (cmd->buttons & IN_DUCK)
        cmd->sidemove = cmd->tick_count & 1 ? 3.25f : -3.25f;
    else
        cmd->sidemove = cmd->tick_count & 1 ? 1.1f : -1.1f;
}

have fun :)
good post bro
 

dimitricze

Newbie
Newbie
Newbie
Newbie
Status
Offline
Joined
Feb 22, 2020
Messages
6
Reaction score
1
This guide is assuming that you have the necessary stuff (createmove hook, usercmd class etc.)

warning, this may be wrong, if it is feel free to correct me.

No quote

EDIT: UPDATED! might be slightly wrong still so please point out any errors and I'll fix it.
pls like me
 
Top