Вопрос Изменение hp bar'a

Начинающий
Статус
Оффлайн
Регистрация
11 Июн 2021
Сообщения
9
Реакции[?]
2
Поинты[?]
0
где можно убрать это уродское скругления хп бара

p.s. снюс легендвара
1632344598724.png
 
Эксперт
Статус
Оффлайн
Регистрация
13 Сен 2020
Сообщения
1,414
Реакции[?]
710
Поинты[?]
7K
Начинающий
Статус
Оффлайн
Регистрация
11 Июн 2021
Сообщения
9
Реакции[?]
2
Поинты[?]
0
найди строчку рендера хпбара и убери закругление
либо я слепой, либо тут его нету
C++:
void playeresp::draw_health(player_t* m_entity, const Box& box, const HPInfo& hpbox)
{
    if (!g_cfg.player.type[type].health)
        return;

    auto alpha = (int)(255.0f * esp_alpha_fade[m_entity->EntIndex()]);

    auto text_color = m_entity->IsDormant() ? Color(130, 130, 130, alpha) : Color(255, 255, 255, alpha);
    auto back_color = Color(0, 0, 0, (int)(alpha * 0.6f));
    auto color = m_entity->IsDormant() ? Color(130, 130, 130) : Color(150, (int)min(255.0f, hpbox.hp * 225.0f / 100.0f), 0);
    auto hp_effect_color = Color(215, 20, 20, alpha);

    if (g_cfg.player.type[type].custom_health_color)
        color = m_entity->IsDormant() ? Color(130, 130, 130) : g_cfg.player.type[type].health_color;

    color.SetAlpha(alpha);
 
Эксперт
Статус
Оффлайн
Регистрация
7 Сен 2019
Сообщения
2,107
Реакции[?]
984
Поинты[?]
88K
либо я слепой, либо тут его нету
C++:
void playeresp::draw_health(player_t* m_entity, const Box& box, const HPInfo& hpbox)
{
    if (!g_cfg.player.type[type].health)
        return;

    auto alpha = (int)(255.0f * esp_alpha_fade[m_entity->EntIndex()]);

    auto text_color = m_entity->IsDormant() ? Color(130, 130, 130, alpha) : Color(255, 255, 255, alpha);
    auto back_color = Color(0, 0, 0, (int)(alpha * 0.6f));
    auto color = m_entity->IsDormant() ? Color(130, 130, 130) : Color(150, (int)min(255.0f, hpbox.hp * 225.0f / 100.0f), 0);
    auto hp_effect_color = Color(215, 20, 20, alpha);

    if (g_cfg.player.type[type].custom_health_color)
        color = m_entity->IsDormant() ? Color(130, 130, 130) : g_cfg.player.type[type].health_color;

    color.SetAlpha(alpha);
дай полностью draw_health до 2 }
 
Начинающий
Статус
Оффлайн
Регистрация
11 Июн 2021
Сообщения
9
Реакции[?]
2
Поинты[?]
0
дай полностью draw_health до 2 }
C++:
void playeresp::draw_health(player_t* m_entity, const Box& box, const HPInfo& hpbox)
{
    if (!g_cfg.player.type[type].health)
        return;

    auto alpha = (int)(255.0f * esp_alpha_fade[m_entity->EntIndex()]);

    auto text_color = m_entity->IsDormant() ? Color(130, 130, 130, alpha) : Color(255, 255, 255, alpha);
    auto back_color = Color(0, 0, 0, (int)(alpha * 0.6f));
    auto color = m_entity->IsDormant() ? Color(130, 130, 130) : Color(150, (int)min(255.0f, hpbox.hp * 225.0f / 100.0f), 0);
    auto hp_effect_color = Color(215, 20, 20, alpha);

    if (g_cfg.player.type[type].custom_health_color)
        color = m_entity->IsDormant() ? Color(130, 130, 130) : g_cfg.player.type[type].health_color;

    color.SetAlpha(alpha);
    render::get().rect(box.x - 6, box.y, 4, box.h, back_color);

    Box n_box =
    {
        box.x - 5,
        box.y,
        2,
        box.h
    };

    auto bar_height = (int)((float)hpbox.hp * (float)n_box.h / 100.0f);
    auto offset = n_box.h - bar_height;

    render::get().rect_filled(n_box.x, n_box.y - 1, 2, n_box.h + 2, back_color);
    render::get().rect_filled(n_box.x, n_box.y + offset, 2, bar_height, color);

    auto height = n_box.h - hpbox.hp * n_box.h / 100;

    if (hpbox.hp_difference)
        render::get().rect_filled(n_box.x, n_box.y + height - hpbox.hp_difference * n_box.h / 100, 2, hpbox.hp_difference * n_box.h / 100, hp_effect_color);

    if (hpbox.hp < 100)
        render::get().text(fonts[ESP], n_box.x + 1, n_box.y + offset, text_color, HFONT_CENTERED_X | HFONT_CENTERED_Y, std::to_string(hpbox.hp).c_str());
}
 
Эксперт
Статус
Оффлайн
Регистрация
13 Сен 2020
Сообщения
1,414
Реакции[?]
710
Поинты[?]
7K
либо я слепой, либо тут его нету
C++:
void playeresp::draw_health(player_t* m_entity, const Box& box, const HPInfo& hpbox)
{
    if (!g_cfg.player.type[type].health)
        return;

    auto alpha = (int)(255.0f * esp_alpha_fade[m_entity->EntIndex()]);

    auto text_color = m_entity->IsDormant() ? Color(130, 130, 130, alpha) : Color(255, 255, 255, alpha);
    auto back_color = Color(0, 0, 0, (int)(alpha * 0.6f));
    auto color = m_entity->IsDormant() ? Color(130, 130, 130) : Color(150, (int)min(255.0f, hpbox.hp * 225.0f / 100.0f), 0);
    auto hp_effect_color = Color(215, 20, 20, alpha);

    if (g_cfg.player.type[type].custom_health_color)
        color = m_entity->IsDormant() ? Color(130, 130, 130) : g_cfg.player.type[type].health_color;

    color.SetAlpha(alpha);
друган рендер полоски дай. если оно есть, значит его что-то делает
C++:
void playeresp::draw_health(player_t* m_entity, const Box& box, const HPInfo& hpbox)
{
    if (!g_cfg.player.type[type].health)
        return;

    auto alpha = (int)(255.0f * esp_alpha_fade[m_entity->EntIndex()]);

    auto text_color = m_entity->IsDormant() ? Color(130, 130, 130, alpha) : Color(255, 255, 255, alpha);
    auto back_color = Color(0, 0, 0, (int)(alpha * 0.6f));
    auto color = m_entity->IsDormant() ? Color(130, 130, 130) : Color(150, (int)min(255.0f, hpbox.hp * 225.0f / 100.0f), 0);
    auto hp_effect_color = Color(215, 20, 20, alpha);

    if (g_cfg.player.type[type].custom_health_color)
        color = m_entity->IsDormant() ? Color(130, 130, 130) : g_cfg.player.type[type].health_color;

    color.SetAlpha(alpha);
    render::get().rect(box.x - 6, box.y, 4, box.h, back_color);

    Box n_box =
    {
        box.x - 5,
        box.y,
        2,
        box.h
    };

    auto bar_height = (int)((float)hpbox.hp * (float)n_box.h / 100.0f);
    auto offset = n_box.h - bar_height;

    render::get().rect_filled(n_box.x, n_box.y - 1, 2, n_box.h + 2, back_color);
    render::get().rect_filled(n_box.x, n_box.y + offset, 2, bar_height, color);

    auto height = n_box.h - hpbox.hp * n_box.h / 100;

    if (hpbox.hp_difference)
        render::get().rect_filled(n_box.x, n_box.y + height - hpbox.hp_difference * n_box.h / 100, 2, hpbox.hp_difference * n_box.h / 100, hp_effect_color);

    if (hpbox.hp < 100)
        render::get().text(fonts[ESP], n_box.x + 1, n_box.y + offset, text_color, HFONT_CENTERED_X | HFONT_CENTERED_Y, std::to_string(hpbox.hp).c_str());
}
аргумент "2" наверно и есть закругление твое
 
Участник
Статус
Оффлайн
Регистрация
30 Авг 2020
Сообщения
660
Реакции[?]
396
Поинты[?]
16K
render::get().rect_filled(n_box.x, n_box.y - 1, 2, n_box.h + 2, back_color); render::get().rect_filled(n_box.x, n_box.y + offset, 2, bar_height, color);
У него второй ректангл под основным рендерится , ещё и неправильно по координатам . Да и вообще вроде как это проблема рендера в вашем ебаном лв.
Аргумент "2" это ширина ректангла.
Можешь лишь убрать тот ,в котором аргументом цвета является "back_color". Может быть решит твою проблему.
аргумент "2" наверно и есть закругление твое
Wrong
 
Сверху Снизу