Newbie HvHer
- User ID
- 36253
- Messages
- 3
- Reactions
- 0
- Level
- 3
reversed by ttx (moneybot beta)
C++:
void FixVelocity(Player* m_player, LagRecord* record, LagRecord* previous, float max_speed, float a3) {
float v5;
float v10;
v5 = a3;
float y;
float z; // xmm6_4
float v12; // xmm0_4
float v13; // xmm3_4
float v14; // xmm5_4
float v15; // xmm6_4
float v16; // xmm7_4
if (!previous)
{
if (record->m_layers[6].m_playback_rate <= 0.0
|| (record->m_layers[6].m_weight = record->m_layers[6].m_weight, record->m_layers[6].m_weight == 0.0)
|| (y = record->m_velocity.y,
v10 = record->m_velocity.x,
z = record->m_velocity.z,
v12 = record->m_velocity.length() > 0.1f))
{
v14 = 0.0;
v15 = 0.0;
v16 = 0.0;
}
else
{
if ((record->m_flags & 6) != 0)
{
v5 = v5 * 0.34;
}
else if (m_player->m_bIsWalking())
{
v5 = v5 * 0.51999998;
}
v13 = (float)(record->m_layers[6].m_weight * v5) / v12;
v14 = v10 * v13;
v15 = z * v13;
v16 = y * v13;
}
record->m_velocity.y = v16;
record->m_velocity.z = v15;
record->m_velocity.x = v14;
if ((record->m_flags & 1) != 0)
record->m_velocity.z = 0.0;
record->m_anim_velocity = record->m_velocity;
return;
}
if ((m_player->m_fEffects() & 8) != 0
|| m_player->m_ubEFNoInterpParity() != m_player->m_ubEFNoInterpParityOld()) {
record->m_velocity.clear();
record->m_anim_velocity.clear();
return;
record->m_velocity.z = 0.0;
record->m_velocity.y = 0.0;
record->m_velocity.x = 0.0;
LABEL_63:
record->m_anim_velocity.x = 0.0;
record->m_anim_velocity.y = 0.0;
record->m_anim_velocity.z = 0.0;
return;
}
bool v18; // zf
char a4_3; // [esp+33h] [ebp+Bh]
if ((record->m_flags & 1) == 0 || (v18 = (previous->m_flags & 1) == 0, a4_3 = 0, v18))
a4_3 = 1;
if (record->m_lag <= 1)
record->m_velocity.z = 0.0;
record->m_velocity.y = 0.0;
record->m_velocity.x = 0.0;
float v19; // xmm5_4
float v20; // xmm6_4
float v21; // xmm4_4
int v22; // eax
float v23; // xmm0_4
float v24; // xmm2_4
float v25; // xmm1_4
v19 = record->m_origin.x - previous->m_origin.x;
v20 = record->m_origin.y - previous->m_origin.y;
v21 = record->m_origin.z - previous->m_origin.z;
if ((previous->m_flags & 1) == 0 && (record->m_flags & 1) == 0)
{
v22 = record->m_flags & 2;
if ((previous->m_flags & 2) != v22)
{
if (v22)
v23 = 9.0;
else
v23 = -9.0;
v21 = v21 - v23;
}
}
}