- Статус
- Оффлайн
- Регистрация
- 27 Фев 2019
- Сообщения
- 1,128
- Реакции
- 393
C++:
void Resolver::AnimationFix(C_BaseEntity* pEnt)[/FONT][/B]
[FONT=trebuchet ms][B]{
auto v3 = Globals::LocalPlayer;
if (v3 != pEnt)
{
auto animstate = pEnt->AnimState();
auto Resolver = [animstate]() {[/FONT][/B]
if(resolver) animstate->m_flGoalFeetYaw = player->GetEyeAngles().y + Globals::MissedShots[player->EntIndex()] % 2 ? -60 :60;
[B][FONT=trebuchet ms] };
auto player_index = pEnt->EntIndex() - 1;
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->ClientAnimations(true);[/FONT][/B]
Resolver(pEnt);
[B][FONT=trebuchet ms] pEnt->UpdateClientAnimation();
pEnt->ClientAnimations(false);
g_pGlobalVars->curtime = old_curtime;
g_pGlobalVars->frametime = old_frametime;
pEnt->SetAbsAngles(Vector(0, player_animation_state->m_flGoalFeetYaw, 0));
}[/B][/FONT]
[B][FONT=trebuchet ms]}
Последнее редактирование: