already
int resolving_way;resolving_way is undefined
int resolving_way;resolving_way is undefined
Рес в принципе не плохойКороче строго не судите, попытался сделать что то годное. Получилось или нет, судите сами.
C++:void resolver::resolve_yaw() { float no_side = FLT_MAX; auto animstate = player->get_animation_state(); AnimationLayer layers[15]; AnimationLayer moveLayers[3][15]; memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15); auto speed = player->m_vecVelocity().Length2D(); int m_side; if (speed <= 0.1f) { auto delta = math::AngleDiff(player->m_angEyeAngles().y, player->get_animation_state()->m_flGoalFeetYaw); if (layers[3].m_flWeight == 0.0f && layers[3].m_flCycle == 0.0f) { resolving_way = (math::AngleDiff(player->get_animation_state()->m_flEyeYaw, player->get_animation_state()->m_flGoalFeetYaw) <= 0.0) - 1; } } if (int(layers[12].m_flWeight * 1000.0f) == int(layers[6].m_flWeight * 1000.0f)) { float firstDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate); float secondDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate); float thirdDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate); if (firstDelta < secondDelta || thirdDelta <= secondDelta || (secondDelta * 1000.0)) { if (firstDelta >= thirdDelta && secondDelta > thirdDelta && !(thirdDelta * 1000.0)) { m_side= 1; } } else { m_side= -1; } } if (m_side= -1) { animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 60.f); switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 30.f); break; } } else if (m_side= 1) { animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f); switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 60.f); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 30.f); break; } } }
AnimationLayer layers[15];
AnimationLayer moveLayers[3][15];
memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15);
thanks for this releaseКороче строго не судите, попытался сделать что то годное. Получилось или нет, судите сами.
C++:void resolver::resolve_yaw() { float no_side = FLT_MAX; auto animstate = player->get_animation_state(); AnimationLayer layers[15]; AnimationLayer moveLayers[3][15]; memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15); auto speed = player->m_vecVelocity().Length2D(); int m_side; if (speed <= 0.1f) { auto delta = math::AngleDiff(player->m_angEyeAngles().y, player->get_animation_state()->m_flGoalFeetYaw); if (layers[3].m_flWeight == 0.0f && layers[3].m_flCycle == 0.0f) { resolving_way = (math::AngleDiff(player->get_animation_state()->m_flEyeYaw, player->get_animation_state()->m_flGoalFeetYaw) <= 0.0) - 1; } } if (int(layers[12].m_flWeight * 1000.0f) == int(layers[6].m_flWeight * 1000.0f)) { float firstDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate); float secondDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate); float thirdDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate); if (firstDelta < secondDelta || thirdDelta <= secondDelta || (secondDelta * 1000.0)) { if (firstDelta >= thirdDelta && secondDelta > thirdDelta && !(thirdDelta * 1000.0)) { m_side= 1; } } else { m_side= -1; } } if (m_side= -1) { animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 60.f); switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 30.f); break; } } else if (m_side= 1) { animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f); switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 60.f); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 30.f); break; } } }
Сравнивать вейт эта кринжуха)))Ну у парня половина кода не правильно сделана. Хотя сама логика брута, уже есть прогресс. Но как минимум, ему следовало бы изучить С++.
Из-за того, что он присваивает сайды, вместо проверки на равенство, он ломает весь код. Я уже молчу о том, что он сравнивает вейт 12 леера с вейтом 6 леера, вместо того, что б нормально спастить.
Нафиг вы вообще пастите этот мусор, я спастил себе, ели попадает. Ну ладно там я, может я дурень и что-то не так сделал. Так в меня пандора тоже миссает в мувы постоянно, у которой такой же пащенный ресольвер.... Перестаньте пастить этот бред, обычный +- 60 рандом на мувы будет куда полезнее чем вот это вот все, даже если бы оно на 100% правильным.
Я кнш всё понимаю и не хочу никого оскорбить, но если бы ты хоть чуть-чуть в сурсах порылся, понял бы, что анимлеер 3 по сути бесполезен. И зачем сравнивать вейт двух лееров?Короче строго не судите, попытался сделать что то годное. Получилось или нет, судите сами.
C++:void resolver::resolve_yaw() { float no_side = FLT_MAX; auto animstate = player->get_animation_state(); AnimationLayer layers[15]; AnimationLayer moveLayers[3][15]; memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15); auto speed = player->m_vecVelocity().Length2D(); int m_side; if (speed <= 0.1f) { auto delta = math::AngleDiff(player->m_angEyeAngles().y, player->get_animation_state()->m_flGoalFeetYaw); if (layers[3].m_flWeight == 0.0f && layers[3].m_flCycle == 0.0f) { resolving_way = (math::AngleDiff(player->get_animation_state()->m_flEyeYaw, player->get_animation_state()->m_flGoalFeetYaw) <= 0.0) - 1; } } if (int(layers[12].m_flWeight * 1000.0f) == int(layers[6].m_flWeight * 1000.0f)) { float firstDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate); float secondDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate); float thirdDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate); if (firstDelta < secondDelta || thirdDelta <= secondDelta || (secondDelta * 1000.0)) { if (firstDelta >= thirdDelta && secondDelta > thirdDelta && !(thirdDelta * 1000.0)) { m_side= 1; } } else { m_side= -1; } } if (m_side= -1) { animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 60.f); switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 30.f); break; } } else if (m_side= 1) { animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f); switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 60.f); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 30.f); break; } } }
не правильная херня во всех частях кодаКороче строго не судите, попытался сделать что то годное. Получилось или нет, судите сами.
C++:void resolver::resolve_yaw() { float no_side = FLT_MAX; auto animstate = player->get_animation_state(); AnimationLayer layers[15]; AnimationLayer moveLayers[3][15]; memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15); auto speed = player->m_vecVelocity().Length2D(); int m_side; if (speed <= 0.1f) { auto delta = math::AngleDiff(player->m_angEyeAngles().y, player->get_animation_state()->m_flGoalFeetYaw); if (layers[3].m_flWeight == 0.0f && layers[3].m_flCycle == 0.0f) { resolving_way = (math::AngleDiff(player->get_animation_state()->m_flEyeYaw, player->get_animation_state()->m_flGoalFeetYaw) <= 0.0) - 1; } } if (int(layers[12].m_flWeight * 1000.0f) == int(layers[6].m_flWeight * 1000.0f)) { float firstDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate); float secondDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate); float thirdDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate); if (firstDelta < secondDelta || thirdDelta <= secondDelta || (secondDelta * 1000.0)) { if (firstDelta >= thirdDelta && secondDelta > thirdDelta && !(thirdDelta * 1000.0)) { m_side= 1; } } else { m_side= -1; } } if (m_side= -1) { animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 60.f); switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 30.f); break; } } else if (m_side= 1) { animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f); switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 60.f); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 30.f); break; } } }
paste it in math.cppCould you give me AngleDiff???
float AngleDiff(float destAngle, float srcAngle)
{
float delta = std::remainderf(destAngle - srcAngle, 360.0f);
if (delta < -180)
delta += 360;
else if (delta > 180)
delta -= 360;
return delta;
}
крутой еще и с вронг реверсом крутойКороче строго не судите, попытался сделать что то годное. Получилось или нет, судите сами.
C++:void resolver::resolve_yaw() { float no_side = FLT_MAX; auto animstate = player->get_animation_state(); AnimationLayer layers[15]; AnimationLayer moveLayers[3][15]; memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15); auto speed = player->m_vecVelocity().Length2D(); int m_side; if (speed <= 0.1f) { auto delta = math::AngleDiff(player->m_angEyeAngles().y, player->get_animation_state()->m_flGoalFeetYaw); if (layers[3].m_flWeight == 0.0f && layers[3].m_flCycle == 0.0f) { resolving_way = (math::AngleDiff(player->get_animation_state()->m_flEyeYaw, player->get_animation_state()->m_flGoalFeetYaw) <= 0.0) - 1; } } if (int(layers[12].m_flWeight * 1000.0f) == int(layers[6].m_flWeight * 1000.0f)) { float firstDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate); float secondDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate); float thirdDelta = fabs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate); if (firstDelta < secondDelta || thirdDelta <= secondDelta || (secondDelta * 1000.0)) { if (firstDelta >= thirdDelta && secondDelta > thirdDelta && !(thirdDelta * 1000.0)) { m_side= 1; } } else { m_side= -1; } } if (m_side= -1) { animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 60.f); switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 30.f); break; } } else if (m_side= 1) { animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f); switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 60.f); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 30.f); break; } } }
Ты от него недалеко ушёл...Неверлус в точности так же делает, молодец, рекомендую!
Да какое там, я неверлус не догнал еще, у меня лееры в кр муве сторятся на аиме(Ты от него недалеко ушёл...
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz