-
Автор темы
- #1
при установки бекапных лееров появился такой баг
Код:
void CLocalAnimations::StoreLocalAnims() {
auto animstate = Cheat.LocalPlayer->GetAnimstate();
memcpy(local_animlayers, Cheat.LocalPlayer->GetAnimlayers(), sizeof(AnimationLayer) * 13);
stored_local_anims.poseparams = Cheat.LocalPlayer->m_flPoseParameter();
local_abs_angles = QAngle(0, animstate->flGoalFeetYaw, 0);
stored_local_anims.filled = true;
}
void CLocalAnimations::RestoreLocalAnims() {
if (!stored_local_anims.filled)
return;
memcpy(Cheat.LocalPlayer->GetAnimlayers(), local_animlayers, sizeof(AnimationLayer) * 13);
Cheat.LocalPlayer->m_flPoseParameter() = stored_local_anims.poseparams;
Cheat.LocalPlayer->SetAbsAngles(local_abs_angles);
}
void CLocalAnimations::OnCreateMove() {
CCSGOPlayerAnimationState* animstate = Cheat.LocalPlayer->GetAnimstate();
animstate->SetTickInterval();
if (AntiAim->desyncing)
animstate->flGoalFeetYaw = AntiAim->realAngle;
animstate->iLastUpdateFrame = 0;
Cheat.LocalPlayer->UpdateAnimationState(animstate, Cheat.thirdpersonAngles, true);
Cheat.LocalPlayer->UpdateClientSideAnimation();
if (!ClientState->m_nChokedCommands) {
Cheat.LocalPlayer->m_flPoseParameter() = stored_local_anims.poseparams;
}
if (AntiAim->desyncing)
animstate->flGoalFeetYaw = AntiAim->realAngle;
if (ctx.send_packet)
StoreLocalAnims();
}
void CLocalAnimations::UpdateLocalAnimations() {
CCSGOPlayerAnimationState* animstate = Cheat.LocalPlayer->GetAnimstate();
animstate->iLastUpdateFrame = GlobalVars->framecount;
RestoreLocalAnims();