Пиши в лс форума, напишу тебеПосмотреть вложение 117513да блять где вы берете этот англедифф
Чел... оно крашитI added it to the project, thanks
where do I get valve sdk from? can you leave a linkОдин умный ответ на всю тему
ValveSDK pasters
can you google?where do I get valve sdk from? can you leave a link
yes my brain poo poocan you google?
pls send link i can't find it, i have liek 3 braincells leftcan you google?
Уфф, то чувство когда немного переделал ресик от Burgarino который я слил =) риииииииичВсем привет, держите ресольвер на лв, если что-то не так говорите, я попытаюсь исправить(и да там все не так)
говнокод down |
C++:#include "animation_system.h" #include "..\ragebot\aim.h" void resolver::initialize(player_t* e, adjust_data* record, const float& goal_feet_yaw, const float& pitch) { player = e; player_record = record; original_goal_feet_yaw = math::normalize_yaw(goal_feet_yaw); original_pitch = math::normalize_pitch(pitch); } void resolver::reset() { player = nullptr; player_record = nullptr; side = false; fake = false; was_first_bruteforce = false; was_second_bruteforce = false; original_goal_feet_yaw = 0.0f; original_pitch = 0.0f; } float flAngleMod(float flAngle) { return((360.0f / 65536.0f) * ((int32_t)(flAngle * (65536.0f / 360.0f)) & 65535)); } float ApproachAngle(float target, float value, float speed) { target = flAngleMod(target); value = flAngleMod(value); float delta = target - value; // Speed is assumed to be positive if (speed < 0) speed = -speed; if (delta < -180) delta += 360; else if (delta > 180) delta -= 360; if (delta > speed) value += speed; else if (delta < -speed) value -= speed; else value = target; return value; } void resolver::resolve_yaw() { AnimationLayer animlayers[15]; AnimationLayer moveLayers[3][15]; memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15); auto animstate = player->get_animation_state(); auto speed = player->m_vecVelocity().Length2D(); if (speed <= 1.1f) // проверка велосити { auto delta = math::AngleDiff(player->m_angEyeAngles().y, animstate->m_flGoalFeetYaw); if (abs(delta) > 35) { resolving_way = delta > 0 ? -1 : 1; } else { resolving_way = (math::normalize_yaw(ApproachAngle( player_record->lby, original_goal_feet_yaw, animstate->m_flUpdateTimeDelta * 100.0f)) - original_goal_feet_yaw) > 0 ? 1 : -1; } } else if (!int(animlayers[12].m_flWeight * 1000.f)) // это нужно)() { if (int(animlayers[6].m_flWeight * 1000.f) == int(animlayers[6].m_flWeight * 1000.f)) // layer[6] { float delta1 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate); // left float delta2 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate); // middle float delta3 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate); // right if (delta1 < delta2 || delta3 <= delta2 || (int)(float)(delta2 * 1000.0f)) { if (delta1 >= delta3 && delta2 > delta3 && !(int)(float)(delta3 * 1000.0f)) { resolving_way = 1; // Right } } else { resolving_way = -1; // Left } float last_delta1 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate); // middle float last_delta3 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate); // left float last_delta2 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate); // right last_delta1 = delta1; last_delta2 = delta2; last_delta3 = delta3; { if (last_delta2 > 0 || last_delta3 > 0) { float delta2 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate); // left float delta3 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate); // right if (delta2 < last_delta2 && delta3 >= last_delta3) { resolving_way = -1; // Left } else if (delta3 < delta2 || last_delta3 < last_delta2) { resolving_way = 1; // Right } } } } if (g_ctx.globals.missed_shots[player->EntIndex()] == 0) { animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 35.f * resolving_way); } else { switch (g_ctx.globals.missed_shots[player->EntIndex()] % 5) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * resolving_way); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 35.f * resolving_way); break; case 2: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * resolving_way); break; case 3: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 35.f * resolving_way); break; case 4: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y); break; } } } } float resolver::resolve_pitch() { return original_pitch; }
это неправильная реализация ресольвера от Solpadoin
Вроде резолвер норм можетВсем привет, держите ресольвер на лв, если что-то не так говорите, я попытаюсь исправить(и да там все не так)
говнокод down |
C++:#include "animation_system.h" #include "..\ragebot\aim.h" void resolver::initialize(player_t* e, adjust_data* record, const float& goal_feet_yaw, const float& pitch) { player = e; player_record = record; original_goal_feet_yaw = math::normalize_yaw(goal_feet_yaw); original_pitch = math::normalize_pitch(pitch); } void resolver::reset() { player = nullptr; player_record = nullptr; side = false; fake = false; was_first_bruteforce = false; was_second_bruteforce = false; original_goal_feet_yaw = 0.0f; original_pitch = 0.0f; } float flAngleMod(float flAngle) { return((360.0f / 65536.0f) * ((int32_t)(flAngle * (65536.0f / 360.0f)) & 65535)); } float ApproachAngle(float target, float value, float speed) { target = flAngleMod(target); value = flAngleMod(value); float delta = target - value; // Speed is assumed to be positive if (speed < 0) speed = -speed; if (delta < -180) delta += 360; else if (delta > 180) delta -= 360; if (delta > speed) value += speed; else if (delta < -speed) value -= speed; else value = target; return value; } void resolver::resolve_yaw() { AnimationLayer animlayers[15]; AnimationLayer moveLayers[3][15]; memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15); auto animstate = player->get_animation_state(); auto speed = player->m_vecVelocity().Length2D(); if (speed <= 1.1f) // проверка велосити { auto delta = math::AngleDiff(player->m_angEyeAngles().y, animstate->m_flGoalFeetYaw); if (abs(delta) > 35) { resolving_way = delta > 0 ? -1 : 1; } else { resolving_way = (math::normalize_yaw(ApproachAngle( player_record->lby, original_goal_feet_yaw, animstate->m_flUpdateTimeDelta * 100.0f)) - original_goal_feet_yaw) > 0 ? 1 : -1; } } else if (!int(animlayers[12].m_flWeight * 1000.f)) // это нужно)() { if (int(animlayers[6].m_flWeight * 1000.f) == int(animlayers[6].m_flWeight * 1000.f)) // layer[6] { float delta1 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate); // left float delta2 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate); // middle float delta3 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate); // right if (delta1 < delta2 || delta3 <= delta2 || (int)(float)(delta2 * 1000.0f)) { if (delta1 >= delta3 && delta2 > delta3 && !(int)(float)(delta3 * 1000.0f)) { resolving_way = 1; // Right } } else { resolving_way = -1; // Left } float last_delta1 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate); // middle float last_delta3 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate); // left float last_delta2 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate); // right last_delta1 = delta1; last_delta2 = delta2; last_delta3 = delta3; { if (last_delta2 > 0 || last_delta3 > 0) { float delta2 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate); // left float delta3 = fabsf(animlayers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate); // right if (delta2 < last_delta2 && delta3 >= last_delta3) { resolving_way = -1; // Left } else if (delta3 < delta2 || last_delta3 < last_delta2) { resolving_way = 1; // Right } } } } if (g_ctx.globals.missed_shots[player->EntIndex()] == 0) { animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 35.f * resolving_way); } else { switch (g_ctx.globals.missed_shots[player->EntIndex()] % 5) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * resolving_way); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 35.f * resolving_way); break; case 2: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * resolving_way); break; case 3: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 35.f * resolving_way); break; case 4: animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y); break; } } float resolver::resolve_pitch() { return original_pitch; }
кому ты его давал))?он даже не чё не переделал тот же код слил каторый дал ему хз че он менял ,
я ему фан ресик дал он говорит говно так конешно говно кто ему за бесплатно норм ресик даст
Если бы дело было только в неправильном взятии лееров, но я тут смотрю, решили прям конкретно все сломать :Dэто неправильная реализация ресольвера от Solpadoin
Помогите с AngelDiff Посмотреть вложение 119225
float AngleDiff( float destAngle, float srcAngle )
{
float delta;
delta = fmodf(destAngle - srcAngle, 360.0f);
if ( destAngle > srcAngle )
{
if ( delta >= 180 )
delta -= 360;
}
else
{
if ( delta <= -180 )
delta += 360;
}
return delta;
}
В матике добавь ангел диф(найди в инете как)Помогите с AngelDiff Посмотреть вложение 119225
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz