- Status
- Offline
- Joined
- Jun 11, 2019
- Messages
- 76
- Reaction score
- 101
Yeah. because a lot of people were begging for this, i post here the shi*.
Credits:
Credits:
You cant view this link please login.
C++:
using namespace std;
float getcorrectfloat(float min, float max)
{
return min + (rand() / ( RAND_MAX / (max-min) ) ) ;
}
float calculateSD(float data[]);
float calculateSD(float data[])
{
float delta_y = 0.0, mean, standardDeviation = 0.0;
int i;
for(i = 0; i < 10; ++i)
{
delta_y += data[i];
}
mean = delta_y/10;
for(i = 0; i < 10; ++i)
standardDeviation += pow(data[i] - mean, 2);
return sqrt(standardDeviation / 10);
}
void resolver_run(c_entity* ent)
{
int backup_flags = ent->flags( );
int backup_eflags = ent->eflags( );
static auto data = Utils::PatternScan< uintptr_t* >( client, "55 8B EC 83 EC 10 53 56 57 8B F9 8B 87 ? ? ? ? C1 E8 16" );
auto backup_animstate_ground = ent->animstate()->onground;
static auto FrameRenderEnd_Return = Utils::PatternScan< uintptr_t* >( client, "5F 5E 5D C2 04 00 83 3D" );
float f = ent->animstate()->absrot;
float data[64];
auto c = 5.0 / 9.0 * (f - 32);
auto b = 5 / double(9) * (f - 32);
int arg1, arg2, add, sub, mul, quo, rem ;
__asm__ ( "addl %%ebx, %%eax;" : "=a" (add) : "a" (arg1) , "b" (arg2) );
__asm__ ( "subl %%ebx, %%eax;" : "=a" (sub) : "a" (arg1) , "b" (arg2) );
__asm__ ( "imull %%ebx, %%eax;" : "=a" (mul) : "a" (arg1) , "b" (arg2) );
__asm__ ( "movl $0x0, %%edx;"
"movl %2, %%eax;"
"movl %3, %%ebx;"
"idivl %%ebx;" : "=a" (quo), "=d" (rem) : "g" (arg1), "g" (arg2) );
if ( _ReturnAddress( ) == FrameRenderEnd_Return )
{
if(ent->animlayer(6)->rate == 0)
ent->animstate()->absrot = c;
else
ent->animstate()->absrot = 60;
CSGOPlayerAnimState::Update();
}
else
{
if(ent->animlayer(6)->rate == 0)
ent->animstate()->absrot -= b;
else
ent->animstate()->absrot -= 60;
if(missedshot >= 3)
ent->animstate()->absrot += calculateSD[ent->index()];
else if (missedshot >= 2)
ent->animstate()->absrot += std::max(0.f, ent->animstate()->absrot - ent->animstate()->speed_2d);
if(calculateSD[ent->index()] > c)
ent->animlayer(6)->rate = ent->animstate()->yawrate;
if(arg2 > c)
ent->animstate()->absrot += getcorrectfloat(60, -60);
if(ent->animlayer(3)->rate > 0.0001f)
ent->animstate()->onground = false; // trust me u need it magcialley fexing lby updateds(valve didint fixed it yet)
ent->animstate()->onground = backup_animstate_ground;
if(ent->animlayer(6)->rate != 0)
ent->animlayer(6)->rate = ent->animstate()->yawrate;
if(ent->simtime() != ent->oldsimtime()) // detected chooking
ent->simtime() = ent->oldsimtime();
ent->eflags( ) &= ~0x1000;
ent->abs_velocity( ) = ent->velocity( );
CSGOPlayerAnimState::Update();
ent->flags( ) = backup_flags;
ent->eflags( ) = backup_eflags;
ent->last_setupbones_frame( ) = 0;
// tickbase prediction
// missed due to shit code
}
}