Вопрос No spread cs2

Начинающий
Статус
Оффлайн
Регистрация
13 Сен 2023
Сообщения
17
Реакции[?]
1
Поинты[?]
1K
как сделать чот не вдуплил. если не сложно скиньте сурс, если сложно то пошол я нахуй
 
Пользователь
Статус
Оффлайн
Регистрация
30 Июн 2023
Сообщения
146
Реакции[?]
65
Поинты[?]
36K
Код:
uint32_t GetRandomSeed( const QAngle& angles, int player_render_tick )
{
#ifdef SERVER_DLL
    // sv_usercmd_custom_random_seed = false by default now.
    // m_nPredictionRandomSeed = cmd->random_seed;
    // m_nPredictionRandomSeedServer = sv_usercmd_custom_random_seed ? GetRngSeed() : cmd->random_seed;
    if ( m_nPredictionRandomSeedServer != m_nPredictionRandomSeed )
        return m_nPredictionRandomSeedServer;
#endif

    struct HashBuffer
    {
        float pitch;
        float yaw;
        int tick;
    };
  
    HashBuffer buffer;
  
    float pitch = AngleNormalize(angles.pitch);
    pitch += pitch;
    buffer.pitch = RoundFloat(pitch) * 0.5f;
  
    float yaw = AngleNormalize(angles.yaw);
    yaw += yaw;
    buffer.yaw = RoundFloat(yaw) * 0.5f;
  
    buffer.tick = player_render_tick;
  
    CSHA1 sha1;
    sha1.Reset(  );
    sha1.Update( &buffer, sizeof(buffer) );
    sha1.Final();
  
    return *reinterpret_cast<uint32_t*>(&sha1.m_digest[0]);
}

Код:
bool bForceMaxInaccuracy = weapon_debug_max_inaccuracy.GetBool();
bool bForceInaccuracyDirection = weapon_debug_inaccuracy_only_up.GetBool();
bool bWeaponAccuracyShotgunSpreadPatterns = weapon_accuracy_shotgun_spread_patterns.GetBool();

Math::RandomSeed(nRandomSeed + 1);

float flRadiusCurveDensity = Math::RandomFloat(0.0f, 1.0f);

if (nItemIndex == 64 && nMode == nSecondaryMode) {
  // R8 Revolver secondary fire
  flRadiusCurveDensity = 1.0f - flRadiusCurveDensity * flRadiusCurveDensity;
}
else if (nItemIndex == 28 && flRecoilIndex < 3) {
  // Negev Wild Beast
  for (int nIndex = 3; nIndex > flRecoilIndex; --nIndex) {
    flRadiusCurveDensity *= flRadiusCurveDensity;
  }
  flRadiusCurveDensity = 1.0f - flRadiusCurveDensity;
}

if (bForceMaxInaccuracy) {
  flRadiusCurveDensity = 1.0f;
}

float flTheta0 = Math::RandomFloat(0.0f, 2.0f * M_PI);
if (bForceInaccuracyDirection) {
  flTheta0 = M_PI * 0.5f;
}

if (bWeaponAccuracyShotgunSpreadPatterns)
{
    // Missing.
}



float flRadius0 = flRadiusCurveDensity * flInaccuracy;
float flX0 = flRadius0 * cosf(flTheta0);
float flY0 = flRadius0 * sinf(flTheta0);

float flSpreadCurveDensity = Math::RandomFloat(0.0f, 1.0f);

if (nItemIndex == 64 && nMode == nSecondaryMode) {
  // R8 Revolver secondary fire
  flSpreadCurveDensity = 1.0f - flSpreadCurveDensity * flSpreadCurveDensity;
}
else if (nItemIndex == 28 && flRecoilIndex < 3) {
  // Negev Wild Beast
  for (int nIndex = 3; nIndex > flRecoilIndex; --nIndex) {
    flSpreadCurveDensity *= flSpreadCurveDensity;
  }
  flSpreadCurveDensity = 1.0f - flSpreadCurveDensity;
}

if (bForceMaxInaccuracy) {
  flSpreadCurveDensity = 1.0f;
}

float flTheta1 = Math::RandomFloat(0.0f, 2.0f * M_PI);
if (bForceInaccuracyDirection) {
  flTheta1 = M_PI * 0.5f;
}

float flRadius1 = flSpreadCurveDensity * flSpread;
float flX1 = flRadius1 * cosf(flTheta1);
float flY1 = flRadius1 * sinf(flTheta1);

double flYResult = (double)(flY1 * flRadius0) +
               (double)(flY0 * flRadius1);

double flXResult = (double)(flX1 * flRadius0) +
               (double)(flX0 * flRadius1);
сredits /// sapdragon, tyler durden
 
Пользователь
Статус
Оффлайн
Регистрация
25 Мар 2021
Сообщения
161
Реакции[?]
70
Поинты[?]
27K
Сверху Снизу