Пользователь
-
Автор темы
- #1
C++:
bool __fastcall Rageboba::AutoStop(
__int64 a1,
CBaseUserCmdPB *BaseUserCmdPB,
__int64 a3,
__int64 a4,
int a5,
_BYTE *a6)
{
__int64 v8; // rsi
__int64 v9; // r8
__int64 v10; // rcx
float v11; // xmm6_4
int v12; // ebx
__int64 v13; // r8
float v14; // xmm1_4
float v15; // xmm0_4
__int64 v17; // r8
float v18; // xmm8_4
float v19; // xmm7_4
float v20; // xmm7_4
char v21[16]; // [rsp+20h] [rbp-78h] BYREF
__int64 v22; // [rsp+30h] [rbp-68h] BYREF
if ( (*sub_180031200(a3) & 2) != 0 || (*sub_180031200(a3) & 1) == 0 || !*Config::GetBool(autostop_enable) )
return 1;
v8 = *(NtCurrentTeb()->ThreadLocalStoragePointer + TlsIndex);
if ( dword_180336D78 > *(v8 + 4) )
{
Init_thread_header(&dword_180336D78);
if ( dword_180336D78 == -1 )
{
word_180336D74 = sub_180066450("C_BaseEntity", 0x8C86DFE9, v9, 2096593042);
Init_thread_footer(&dword_180336D78);
}
}
v11 = sub_1800649B0(a3) * 0.33000001;
v12 = dword_180336D78;
if ( dword_180336D78 > *(v8 + 4) )
{
Init_thread_header(&dword_180336D78);
v12 = dword_180336D78;
if ( dword_180336D78 == -1 )
{
word_180336D74 = sub_180066450("C_BaseEntity", 0x8C86DFE9, v13, 2096593042);
Init_thread_footer(&dword_180336D78);
v12 = dword_180336D78;
}
}
v14 = (*(word_180336D74 + a3) * *(word_180336D74 + a3)) + (*(word_180336D74 + a3 + 4) * *(word_180336D74 + a3 + 4));
if ( v14 < 0.0 )
v15 = sqrtf(v14);
else
v15 = fsqrt(v14);
if ( v11 >= v15 )
{
if ( a6[1] )
Miscellaneous::SlowWalk(v10, a3, BaseUserCmdPB);
return 1;
}
v22 = 0i64;
if ( v12 > *(v8 + 4) )
{
Init_thread_header(&dword_180336D78);
if ( dword_180336D78 == -1 )
{
word_180336D74 = sub_180066450("C_BaseEntity", 0x8C86DFE9, v17, 2096593042);
Init_thread_footer(&dword_180336D78);
}
}
Math::VectorAngles((a3 + word_180336D74), &v22);
v18 = cosf(*&v22 * 0.017453292);
v19 = *(sub_180026BA0(qword_180336CE8, v21) + 4);
v20 = (v19 - *(&v22 + 1)) * 0.017453292;
BaseUserCmdPB->flForwardMove = (cosf(v20) * v18) * -320.0;
BaseUserCmdPB->flSideMove = (sinf(v20) * v18) * 320.0;
return !*a6;
}
Последнее редактирование: