From d736a3d99ce39e2baf1b7e39f0b0ea087fe9a815 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Wed, 5 Jul 2017 16:54:26 +0300 Subject: [PATCH] added min size for emoji esp with auto-scaling --- src/hacks/ESP.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hacks/ESP.cpp b/src/hacks/ESP.cpp index fa729a1f..a19815cb 100644 --- a/src/hacks/ESP.cpp +++ b/src/hacks/ESP.cpp @@ -592,6 +592,7 @@ 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"); CatVar emoji_esp_scaling(CV_SWITCH, "esp_emoji_scaling", "1", "Emoji ESP Scaling"); +CatVar emoji_min_size(CV_INT, "esp_emoji_min_size", "20", "Emoji ESP min size", "Minimum size for an emoji when you use auto scaling"); 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); @@ -650,6 +651,9 @@ void _FASTCALL ProcessEntityPT(CachedEntity* ent) { Vector head_scr; if (draw::WorldToScreen(hb->center, head_scr)) { float size = emoji_esp_scaling ? fabs(hbm.y - hbx.y) : float(joy_esp_size); + if (emoji_esp_scaling && (size < float(emoji_min_size))) { + size = float(emoji_min_size); + } textures::AtlasTexture* tx = nullptr; if (int(joy_esp) == 1) tx = &joy_texture; if (int(joy_esp) == 2) tx = &thinking_texture;