KATE Posted July 22, 2019 Share Posted July 22, 2019 C++ void c_animations::local::correct_client_anims() { if (!cheat::local || !cheat::local->alive()) return; sdk::c_animstate* animstate = cheat::local->animstate(); if (!animstate) return; // Backing up current values for restoring later. float old_curtime = cheat::globals->curtime, old_frametime = cheat::globals->frametime; // Resimulate recent commands to refresh the data for animstate. cheat::prediction->run_command(cheat::vars::local_cmd); // Syncing our predicted current time with the server. cheat::globals->curtime = cheat::globals->realtime * cheat::local->anim_layer(0).m_flWeight; // Fixes local player legs on moving if (cheat::local->OnGround()) { cheat::local->anim_layer(6).m_flWeight = 0.f; cheat::local->poseparam(ePoses::MOVE_YAW ) = 1.f / cheat::local->simulationtime(); } // Fixes the client fucking up frametime under certain conditions. cheat::globals->frametime = ((cheat::globals->curtime % 2.f) == 0.f) ? (cheat::local->poseparam(ePoses::BODY_YAW ) * cheat::globals->tick_interval) : (cheat::local->tickbase() * cheat::globals->tick_interval); float corrected_abs_yaw = animstate->old_absyaw; // Always negate the old position. if (corrected_abs_yaw > 0.f) corrected_abs_yaw *= -1.f; // The clients abs yaw is desynced when the yaw is at a certain position at a certain time. // We correct it by negating the old value which is negated when required, to mimic server functionality. if ((cheat::local->eye_angles().yaw >= -45.f && cheat::local->eye_angles().yaw <= 45.f) && ((cheat::globals->curtime % 2.f) == 0.f)) cheat::local->set_abs_angles(sdk::angle_t(0.f, animstate->abs_yaw - corrected_abs_yaw, 0.f)); // Rebuilding bones with corrected values, we'll need to do this twice. // Once here, and once after updating bones. This is to maintain correct shootpos. sdk::c_matrix3x4 temp_matrix[126]; local->setup_bones(cheat::globals->curtime, 0x00000100, temp_matrix, sizeof(ccsgo_player_animstate)); // Forcing the client to update anims under all circumstances. animstate->last_update_framecount = 0.f; // Update clientside anims. cheat::local->client_anims = true; cheat::local->update_client_anims(); cheat::local->client_anims = false; // Explained above. local->setup_bones(cheat::globals->curtime, 0x00000100, temp_matrix, 126); // Restore values to not mess with the game. cheat::globals->curtime = old_curtime; cheat::globals->frametime = old_frametime; } RAW Paste Data: void c_animations::local::correct_client_anims() { if (!cheat::local || !cheat::local->alive()) return; sdk::c_animstate* animstate = cheat::local->animstate(); if (!animstate) return; // Backing up current values for restoring later. float old_curtime = cheat::globals->curtime, old_frametime = cheat::globals->frametime; // Resimulate recent commands to refresh the data for animstate. cheat::prediction->run_command(cheat::vars::local_cmd); // Syncing our predicted current time with the server. cheat::globals->curtime = cheat::globals->realtime * cheat::local->anim_layer(0).m_flWeight; // Fixes local player legs on moving if (cheat::local->OnGround()) { cheat::local->anim_layer(6).m_flWeight = 0.f; cheat::local->poseparam(ePoses::MOVE_YAW ) = 1.f / cheat::local->simulationtime(); } // Fixes the client fucking up frametime under certain conditions. cheat::globals->frametime = ((cheat::globals->curtime % 2.f) == 0.f) ? (cheat::local->poseparam(ePoses::BODY_YAW ) * cheat::globals->tick_interval) : (cheat::local->tickbase() * cheat::globals->tick_interval); float corrected_abs_yaw = animstate->old_absyaw; // Always negate the old position. if (corrected_abs_yaw > 0.f) corrected_abs_yaw *= -1.f; // The clients abs yaw is desynced when the yaw is at a certain position at a certain time. // We correct it by negating the old value which is negated when required, to mimic server functionality. if ((cheat::local->eye_angles().yaw >= -45.f && cheat::local->eye_angles().yaw <= 45.f) && ((cheat::globals->curtime % 2.f) == 0.f)) cheat::local->set_abs_angles(sdk::angle_t(0.f, animstate->abs_yaw - corrected_abs_yaw, 0.f)); // Rebuilding bones with corrected values, we'll need to do this twice. // Once here, and once after updating bones. This is to maintain correct shootpos. sdk::c_matrix3x4 temp_matrix[126]; local->setup_bones(cheat::globals->curtime, 0x00000100, temp_matrix, sizeof(ccsgo_player_animstate)); // Forcing the client to update anims under all circumstances. animstate->last_update_framecount = 0.f; // Update clientside anims. cheat::local->client_anims = true; cheat::local->update_client_anims(); cheat::local->client_anims = false; // Explained above. local->setup_bones(cheat::globals->curtime, 0x00000100, temp_matrix, 126); // Restore values to not mess with the game. cheat::globals->curtime = old_curtime; cheat::globals->frametime = old_frametime; } pastebin: Spoiler https://pastebin.com/FqbtskHF 11 Quote Link to comment Share on other sites More sharing options...
Sηιρєz Posted July 22, 2019 Share Posted July 22, 2019 Excuse me Mr. i am only a beginner in Pasting and working with Sources. My Question is how will the Animfix realy help me if i add it will something change directly? Quote Link to comment Share on other sites More sharing options...
spectrumhvh Posted October 27, 2019 Share Posted October 27, 2019 (edited) cool Edited November 7, 2019 by spectrumhvh e Quote Link to comment Share on other sites More sharing options...
Vortyk Posted December 24, 2020 Share Posted December 24, 2020 nice getze.us animations aka onetap p reversed by soufiw Quote Link to comment Share on other sites More sharing options...
326gtq34gw4 Posted February 7, 2021 Share Posted February 7, 2021 How to use it????? Quote Link to comment Share on other sites More sharing options...
unuall Posted February 15, 2021 Share Posted February 15, 2021 (edited) Holy shit that's sick as fuck. Edited February 15, 2021 by unuall retardo phone autocorrected to "scuffed" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.