- Статус
- Оффлайн
- Регистрация
- 27 Фев 2019
- Сообщения
- 1,128
- Реакции
- 393
C++:
void Resolver::AnimationFix(C_BaseEntity* pEnt)
{
auto animstate = pEnt->AnimState();
switch (Globals::MissedShots[pEnt->EntIndex()] % 8) //19 //26 //14
{
/*case 0: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + 180.f; break;
case 1: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw - 180.f; break;
case 2: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + 89.f; break;
case 3: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw - 89.f; break;
case 4: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + 70.f; break;
case 5: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw - 70.f; break;
case 6: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + 60.f; break;
case 7: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw - 60.f; break;
case 8: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + 58.f; break;
case 9: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw - 58.f; break;
case 10: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + 45.f; break;
case 11: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw - 45.f; break;
case 12: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw + 30.f; break;
case 13: animstate->m_flGoalFeetYaw = animstate->m_flGoalFeetYaw - 30.f; break;*/
/*case 12: animstate->m_fDuckAmount = 1.f; break;*/
case 0: pEnt->GetEyeAngles().y + 60.f; break;
case 1: pEnt->GetEyeAngles().y - 60.f; break;
case 2: pEnt->GetEyeAngles().y + 58.f; break;
case 3: pEnt->GetEyeAngles().y - 58.f; break;
case 4: pEnt->GetEyeAngles().y + 45.f; break;
case 5: pEnt->GetEyeAngles().y - 45.f; break;
case 6: pEnt->GetEyeAngles().y + 30.f; break;
case 7: pEnt->GetEyeAngles().y - 30.f; break;
}
/*if (pEnt == Globals::LocalPlayer) {
pEnt->ClientAnimations(true);
auto player_animation_state = pEnt->AnimState();
player_animation_state->m_flLeanAmount = 20;
player_animation_state->m_flCurrentTorsoYaw += 15;
pEnt->UpdateClientAnimation();
pEnt->SetAbsAngles(Vector(0, player_animation_state->m_flGoalFeetYaw, 0));
pEnt->ClientAnimations(false);
}
else
{
auto player_index = pEnt->EntIndex() - 1;
pEnt->ClientAnimations(true);
auto old_curtime = g_pGlobalVars->curtime;
auto old_frametime = g_pGlobalVars->frametime;
g_pGlobalVars->curtime = pEnt->GetSimulationTime();
g_pGlobalVars->frametime = g_pGlobalVars->intervalPerTick;
auto player_animation_state = pEnt->AnimState();
auto player_model_time = reinterpret_cast<int*>(player_animation_state + 112);
if (player_animation_state != nullptr && player_model_time != nullptr)
if (*player_model_time == g_pGlobalVars->framecount)
*player_model_time = g_pGlobalVars->framecount - 1;
pEnt->UpdateClientAnimation();
g_pGlobalVars->curtime = old_curtime;
g_pGlobalVars->frametime = old_frametime;
pEnt->ClientAnimations(false);
}*/
}
(dev ver. может изменится при выходе!)