designer1337 / csgo-cheat-base

simple csgo internal base.
MIT License
242 stars 50 forks source link

stuttering/screen tearing/laggy models fix #79

Open zacherysun opened 3 years ago

zacherysun commented 3 years ago

in hooks.cpp replace your createmove with

bool __stdcall hooks::create_move::hook(float input_sample_frametime, c_usercmd* cmd) { create_move_original(input_sample_frametime, cmd);

if (!cmd || !cmd->command_number)
    return create_move_original(input_sample_frametime, cmd);

csgo::local_player = static_cast<player_t*>(interfaces::entity_list->get_client_entity(interfaces::engine->get_local_player()));

uintptr_t* frame_pointer;
__asm mov frame_pointer, ebp;
bool& send_packet = *reinterpret_cast<bool*>(*frame_pointer - 0x1C);
misc::movement::bunny_hop(cmd);

prediction::start(cmd); {

} prediction::end();

auto old_viewangles = cmd->viewangles;
auto old_forwardmove = cmd->forwardmove;
auto old_sidemove = cmd->sidemove;

math::correct_movement(old_viewangles, cmd, old_forwardmove, old_sidemove);

cmd->forwardmove = std::clamp(cmd->forwardmove, -450.0f, 450.0f);
cmd->sidemove = std::clamp(cmd->sidemove, -450.0f, 450.0f);
cmd->upmove = std::clamp(cmd->upmove, -320.0f, 320.0f);

cmd->viewangles.normalize();
cmd->viewangles.x = std::clamp(cmd->viewangles.x, -89.0f, 89.0f);
cmd->viewangles.y = std::clamp(cmd->viewangles.y, -180.0f, 180.0f);
cmd->viewangles.z = 0.0f;

return false;

}

// good yes

bruhmoment21 commented 3 years ago

why the useless create_move_original(input_sample_frametime, cmd); call on first line?

zacherysun commented 3 years ago

I don't really know just took the one from aristois and it seemed to work fine with it and I didn't bother to test it without it

comix4k commented 3 years ago

fucked up my jumpbug

zyrion2 commented 3 years ago

HEWWO ZACHERY

zacherysun commented 3 years ago

you

On Thu, Jan 7, 2021 at 11:14 PM Zyrion notifications@github.com wrote:

HEWWO ZACHERY

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/designer1337/csgo-cheat-base/issues/79#issuecomment-756535382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQBZLHSKS32XGT37LL7ONUTSY2BCRANCNFSM4RK2FGVA .