emoji esp
This commit is contained in:
parent
e475f85097
commit
6aa72146c2
BIN
res/atlas.png
BIN
res/atlas.png
Binary file not shown.
Before Width: | Height: | Size: 300 KiB After Width: | Height: | Size: 310 KiB |
BIN
res/atlas.xcf
BIN
res/atlas.xcf
Binary file not shown.
BIN
res/bin/atlas.o
BIN
res/bin/atlas.o
Binary file not shown.
@ -588,6 +588,12 @@ std::unordered_map<studiohdr_t*, bonelist_s> bonelist_map {};
|
||||
* According to profiler, this function is the most time-consuming (and gets called up to 200K times a second)
|
||||
*/
|
||||
|
||||
CatEnum emoji_esp({ "None", "Joy", "Thinking" });
|
||||
CatVar joy_esp(CV_SWITCH, "esp_emoji", "0", "Emoji ESP");
|
||||
CatVar joy_esp_size(CV_FLOAT, "esp_emoji_size", "32", "Emoji ESP Size");
|
||||
textures::AtlasTexture joy_texture(64 * 4, textures::atlas_height - 64 * 4, 64, 64);
|
||||
textures::AtlasTexture thinking_texture(64 * 5, textures::atlas_height - 64 * 4, 64, 64);
|
||||
|
||||
void _FASTCALL ProcessEntityPT(CachedEntity* ent) {
|
||||
PROF_SECTION(PT_esp_process_entity);
|
||||
|
||||
@ -643,6 +649,17 @@ void _FASTCALL ProcessEntityPT(CachedEntity* ent) {
|
||||
if (vischeck && !ent->IsVisible()) transparent = true;
|
||||
if (!fg) fg = colors::EntityF(ent);
|
||||
if (transparent) fg = colors::Transparent(fg);
|
||||
if (joy_esp) {
|
||||
Vector head_pos = ent->hitboxes.GetHitbox(0)->center;
|
||||
Vector head_scr;
|
||||
if (draw::WorldToScreen(head_pos, head_scr)) {
|
||||
textures::AtlasTexture* tx = nullptr;
|
||||
if (int(joy_esp) == 1) tx = &joy_texture;
|
||||
if (int(joy_esp) == 2) tx = &thinking_texture;
|
||||
if (tx)
|
||||
tx->Draw(head_scr.x - float(joy_esp_size) / 2, head_scr.y - float(joy_esp_size) / 2, float(joy_esp_size), float(joy_esp_size));
|
||||
}
|
||||
}
|
||||
DrawBox(ent, fg, static_cast<bool>(box_healthbar), CE_INT(ent, netvar.iHealth), ent->m_iMaxHealth);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user