1. Список говнокодов пользователя danielka33

    Всего: 1

  2. C++ / Говнокод #26905

    +1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    //--------------------------------------------------------------------------------------------------------------------\\
    
        float max_rotation = record->m_pEntity->GetMaxBodyRotation();
       
    
        auto animstate = ent->m_PlayerAnimState();
        float resolve_value = 50.f; //не трогайте это, так и должно быть
    
        if (!record->m_pState)
            return;
    
        const auto info = g_anims.GetAnimationInfo(record->m_pEntity);
        if (!info)
            return;
    
        float eye_yaw = record->m_pState->m_flEyeYaw;
    
        if (max_rotation < resolve_value)
            resolve_value = max_rotation;
    
        data->m_extending = record->m_pLayers[3].m_cycle == 0.f && record->m_pLayers[3].m_weight == 0.f;
        float Delta = AngleDiff(ent->m_angEyeAngles().y, animstate->m_flGoalFeetYaw);
    
        //--------------------------------------------------------------------------------------------------------------------\\
                                                           RESOLVERPART
        //--------------------------------------------------------------------------------------------------------------------\\
    
        if (data->m_extending)
            resolve_value = max_rotation;
    
        if (ent->m_AnimOverlay()[13].m_weight + 14.250f > 0.54)
        {
            if (ent->m_AnimOverlay()[3].m_cycle > 0.12)
            {
                if (ent->m_AnimOverlay()[13].m_cycle > 0.43)
                {
                    animstate->m_flGoalFeetYaw = ent->m_angEyeAngles().y;
                }
            }
        }
    
        if (data->m_extending)
        {
            if (Delta <= 0)
            {
                animstate->m_flGoalFeetYaw = Delta * resolve_value;
            }
            else if (Delta > 0)
            {
                animstate->m_flGoalFeetYaw = Delta * -resolve_value;
            }
        }
    
        else if (ent->m_AnimOverlay()[7].m_order == record->m_pLayers[7].m_order)
        {
            if (ent->m_AnimOverlay()[7].m_cycle > 0.5f)
            {
                animstate->m_flGoalFeetYaw = math::NormalizeYaw(record->m_pEntity->m_flLowerBodyYawTarget()) + get_max_desync_delta;
                return;
            }
            else
                animstate->m_flGoalFeetYaw = record->m_pEntity->m_angEyeAngles().y;
        }
    
        if (record->m_bDidShot)
            info->m_flBrute = Resolver::ResolveShot(data, record);
    
        //--------------------------------------------------------------------------------------------------------------------\\
                                                        BRUTEFORCE PART
        //--------------------------------------------------------------------------------------------------------------------\\
    
        else {
            float lbyt = record->m_pEntity->m_flLowerBodyYawTarget();
            data->m_delta = std::abs(math::NormalizedAngle(eye_yaw - lbyt));
    
            float resolve_yaw = ((data->m_delta < 0.f) ? resolve_value : resolve_value);
    
            switch (data->m_missed_shots % 3) {
            case 0:
                info->m_flBrute = data->m_last_resolve = resolve_yaw;
                break;
            case 1:
                info->m_flBrute = -data->m_last_resolve;
                break;
            case 2:
                info->m_flBrute = 0;
                break;
            }
        }
    
        record->m_pState->m_flGoalFeetYaw = eye_yaw + info->m_flBrute;
    
        //--------------------------------------------------------------------------------------------------------------------\\

    best resolver

    danielka33, 02 Сентября 2020

    Комментарии (0)