void __cdecl c_movement::leg_movement()
{
CUserCmd *cmd; // ecx
float forward_move; // xmm0_4 MAPDST
int forward_buttons; // eax MAPDST
float side_move; // xmm0_4 MAPDST
unsigned int side_buttons; // eax
if ( *g_local_player && g_local_player->move_type() != 9 )
{
cmd = g_user_cmd;
// ~( | IN_MOVERIGHT | IN_BACK | IN_FORWARD)
cmd->m_buttons &= ~(__ROL4__(__ROL4__(4, 6), 1) | __ROR4__(1024, 32) | __ROL4__(__ROR4__(__ROR4__(2, 6), 20), 29) | ((__ROL4__(__ROL4__(305143516, 6), 14) ^ 0x18B12A26) + 177207009));
if ( (*g_cfg->leg_movement)[0] != 1 )
{
if ( (*g_cfg->leg_movement)[0] )
return;
forward_move = cmd->m_forward_move;
if ( forward_move <= 0.0 )
{
if ( forward_move >= 0.0 )
goto SKIP_FORWARD_BUTTONS;
forward_buttons = __ROR4__(__ROR4__(__ROR4__(0x7A06C50F, 0x1A), 0x14), 2) + 0x3AF0860A;// IN_BACK
}
else
{
forward_buttons = __ROL4__(__ROL4__(4, 6), 27);// IN_FORWARD
}
cmd = g_user_cmd;
cmd->m_buttons |= forward_buttons;
SKIP_FORWARD_BUTTONS:
side_move = cmd->m_side_move;
if ( side_move <= 0.0 )
{
if ( side_move >= 0.0 )
return;
side_buttons = (dword_40E188E4 + __ROL4__(__ROL4__(2098614492, 4), 11)) ^ 0x694FC56F;// IN_MOVELEFT
}
else
{
side_buttons = 1024; // IN_MOVERIGHT
}
SET_BUTTONS:
cmd->m_buttons |= side_buttons;
return;
}
forward_move = cmd->m_forward_move;
if ( forward_move <= 0.0 )
{
if ( forward_move >= 0.0 )
goto SKIP_FORWARD_BUTTONS_1;
forward_buttons = __ROL4__(__ROR4__(-2109868801, 8) + 773107023, 9) - 769033811;// IN_FORWARD
}
else
{
forward_buttons = __ROR4__(__ROR4__(__ROR4__(__ROR4__(0x400000, 6), 13), 10), 21);// IN_BACK
}
cmd = g_user_cmd;
cmd->m_buttons |= forward_buttons;
SKIP_FORWARD_BUTTONS_1:
side_move = cmd->m_side_move;
if ( side_move <= 0.0 )
{
if ( side_move >= 0.0 )
return;
side_buttons = __ROR4__(__ROR4__(__ROL4__(0xB1A48A63, 0x1E), 0x16) + 0x5B759D4F, 0x1E);// IN_MOVERIGHT
}
else
{
side_buttons = __ROL4__(0x4000, 0x1B); // IN_MOVELEFT
}
goto SET_BUTTONS;
}
}