Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

Исходник Moneybot spread circle

купить дизайн: yougame.biz/threads/155999
Дизайнер
Дизайнер
Статус
Оффлайн
Регистрация
19 Сен 2018
Сообщения
791
Реакции
1,375
5RanLsd.png

PT1I0Ac.gif


C++:
Expand Collapse Copy
bool c_visuals::build_starry_sky( ) {
    constexpr auto seed = 715u;

    constexpr auto stars_count = 100u;

    constexpr auto radius = static_cast< float >( stars_count );
    constexpr auto diameter = radius * 2.f;

    if ( !m_starry_sky_lookup.empty( ) )
        return true;

    for ( auto y = 1.f; y < diameter; ++y ) {
        const auto chord = std::sqrt( ( diameter - y ) * 4.f * y );

        const auto x = ( static_cast< int >( y ) ^ static_cast< int >( seed * y ) ) % static_cast< int >( chord );

        const auto pos = math::vec2_t( x + (diameter - chord ) / 2.f, y ) - radius;

        m_starry_sky_lookup.emplace_back( std::make_pair( pos / stars_count, pos.length( ) / diameter ) );
    }

    return true;
}

void c_visuals::draw_starry_sky(const math::vec2_t& center, float radius) {
    if (!build_starry_sky())
        return;

    const auto buffer = draw::m_manager->get_buffer();

    for (const auto& star : m_starry_sky_lookup) {
        buffer->rect_filled(center + std::get<math::vec2_t>(star) * radius, math::vec2_t(1.f, 1.f), math::rgba_t(1.f, 1.f, 1.f, std::get<float>(star)));
    }
}

void c_visuals::spread_circle() {
    if (!globals::m_local_player->is_alive())
        return;

    const auto weapon = globals::m_local_player->get_active_weapon();
    if (!weapon)
        return;

    const auto weapon_info = weapon->get_info();
    if (!weapon_info
        || weapon_info->m_type == game::weapon_t::e_type::knife
        || weapon_info->m_type == game::weapon_t::e_type::grenade)
        return;

    const auto screen_size = draw::m_manager->get_screen_size();

    const auto spread = (weapon->get_inaccuracy() + weapon->get_spread()) * weapon->get_max_speed();

    // replace 90 fov (game default) with your custom one
    const auto fov = 90.f;

    const auto step = screen_size.y() / fov / 2.f;

    draw_starry_sky(screen_size / 2.f, spread * step);
}

void c_visuals::process() {
    spread_circle();
}


C++:
Expand Collapse Copy
class c_visuals : public sdk::singleton<c_visuals> {
private:
    std::vector<std::pair<math::vec2_t, float>> m_starry_sky_lookup;

    bool build_starry_sky();

    void draw_starry_sky(const math::vec2_t& center, float radius);

    void spread_circle();

public:
    void process();
};

#define visuals c_visuals::instance()

так же в дополнение к предыдущему посту, код grenade prediction
 
Последнее редактирование:
const auto weapon_info = weapon->get_info();
if (!weapon_info
|| weapon_info->m_type == game::weapon_t::e_type::knife
|| weapon_info->m_type == game::weapon_t::e_type::grenade)
return;
ждем отдачу на бомбу


разве так тяжело использовать квары?
const auto fov = g_CVar->FindVar("viewmodel_fov")->GetFloat();
 
Последнее редактирование:
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
HAHAHA nice fake fucking code russian KEK , there is no where near naves real code
thanks for the fucking eye bleeding great aids code
 
Последнее редактирование модератором:
HAHAHA nice fake fucking code russian KEK , there is no where near naves real code
thanks for the fucking eye bleeding great aids code now have gonorrhea
are you talking about it?
C++:
Expand Collapse Copy
...
for( int seed{ }; seed < 256; ++seed ) {
util::set_random_seed( math::random_number( 0, 255 ) + 1 );
float rand_a = util::get_random_float( 0.f, 1.0f );
float pi_rand_a = util::get_random_float( 0.f, 2.0f * M_PI );
...


firstly: you don't understand what the code is doing, and you passes math functions every frame
secondly: no one said that this is a 1-to-1 code from the moneybot, you came up with this in your head, and for some reason expressed your unnecessary opinion on the topic
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Так, такая херь есть в сурсах сублима.
 
Назад
Сверху Снизу