-
Автор темы
- #1
C:
void __stdcall Resolver(int entity, player_record *a2)
{
float *v3; // edi
Vector *v4; // eax
long double v5; // st7
float v6; // xmm2_4
int v7; // ecx
int v8; // edx
signed int v9; // edx
float v10; // xmm0_4
AimwareGlobals *v12; // eax
float v13; // xmm0_4
bool v14; // zf
signed int v15; // eax
float v16; // xmm0_4
float v17; // xmm0_4 MAPDST
double v18; // st7
float v20; // xmm0_4
float v21; // xmm0_4
double v22; // st7
Vector a2a; // [esp+10h] [ebp-14h]
int v24; // [esp+1Ch] [ebp-8h]
int v25; // [esp+20h] [ebp-4h] MAPDST
float entityc; // [esp+28h] [ebp+4h]
float entitya; // [esp+28h] [ebp+4h]
if ( rbot_resolver && rbot_active )
{
v3 = &a2->record[1].m_flSimulationTime;
v24 = (((*(m_flSimulationTime + entity) - a2->record[1].m_flSimulationTime) / GlobalVars->interval_per_tick) + 0.5);
v4 = (*(*entity + 40))(entity);
a2a.z = 0.0;
a2a.x = 0.0;
v5 = atan2(
(v4->y - AimwareGlobalVars->m_vecEyePosition.y),
COERCE_FLOAT(COERCE_UNSIGNED_INT(v4->x - AimwareGlobalVars->m_vecEyePosition.x) ^ negativeMask));
a2a.y = 0.0;
entityc = v5;
entitya = 360.0 - (entityc * 57.295776);
EdgeAntiaim(entity, &a2a);
v6 = a2->EyeAngles.x;
if ( v6 <= 180.0 )
{
if ( v6 < -180.0 )
v6 = v6 + 360.0;
}
else
{
v6 = v6 - 360.0;
}
v7 = m_angEyeAngles;
v25 = m_angEyeAngles;
*(m_angEyeAngles + entity) = v6;
if ( v6 > 90.0 )
*(v7 + entity) = 0x42B40000;
if ( *(v7 + entity) < -90.0 )
*(v7 + entity) = 0xC2B40000;
v8 = m_fFlags;
if ( !(*(m_fFlags + entity) & 1) && a2->record[1].m_fFlags & 1 && v6 >= 178.36304 )
*(v7 + entity) = 0xC2B40000;
if ( v6 == 180.0 )
{
if ( AimwareGlobalVars->m_nTicks % 2 )
*(v7 + entity) = 0xC2B40000;
else
*(v7 + entity) = 0x42B40000;
}
if ( *(m_moveType + entity) != 9 || v24 < 2 )
*(v8 + entity) = a2->m_fFlags;
else
*(v8 + entity) |= 6u;
v9 = 0;
while ( 1 )
{
v10 = *(v3 - 95) - v3[5];
if ( v10 <= 180.0 )
{
if ( v10 < -180.0 )
v10 = v10 + 360.0;
}
else
{
v10 = v10 - 360.0;
}
if ( COERCE_FLOAT(LODWORD(v10) & absoluteMask) > 135.0 )
break;
if ( (((*(v3 - 100) - *v3) / GlobalVars->interval_per_tick) + 0.5) == 1 )
goto LABEL_56;
++v9;
v3 += 100;
if ( v9 >= 8 )
goto LABEL_36;
}
v12 = AimwareGlobalVars;
v13 = a2->EyeAngles.y;
*(v7 + entity + 4) = v13;
v15 = v12->m_nTicks & 0x80000001;
v14 = v15 == 0;
if ( v15 < 0 )
v14 = ((v15 - 1) | 0xFFFFFFFE) == -1;
if ( v14 )
*(v7 + entity + 4) = v13 + 180.0;
LABEL_36:
if ( rbot_resolver == 2 )
{
v16 = entitya + 180.0;
v17 = entitya + 180.0;
if ( v17 <= 180.0 )
{
if ( v16 < -180.0 )
v17 = v16 + 360.0;
}
else
{
v17 = v16 - 360.0;
}
v18 = RandomFloat(-90.0, 90.0) + v17;
}
else
{
if ( rbot_resolver != 1 )
goto LABEL_56;
v20 = entitya + 180.0;
*(v7 + entity + 4) = a2->m_flLowerBodyYawTarget;
if ( (entitya + 180.0) <= 180.0 )
{
if ( v20 < -180.0 )
v20 = v20 + 360.0;
}
else
{
v20 = v20 - 360.0;
}
v21 = v20 - a2->m_flLowerBodyYawTarget;
if ( v21 <= 180.0 )
{
if ( v21 < -180.0 )
v21 = v21 + 360.0;
}
else
{
v21 = v21 - 360.0;
}
if ( v21 >= 0.0 )
v22 = RandomFloat(0.0, v21);
else
v22 = RandomFloat(v21, 0.0);
v18 = v22 + *(v25 + entity + 4);
}
*(v25 + entity + 4) = v18;
LABEL_56:
if ( a2->m_flLowerBodyYawTargetSimulationTime == *(m_flSimulationTime + entity) )
*(m_angEyeAngles + entity + 4) = a2->m_flLowerBodyYawTarget;
}
}