added min size for emoji esp with auto-scaling
This commit is contained in:
parent
86d2ec9d8e
commit
d736a3d99c
@ -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;
|
||||
|
Reference in New Issue
Block a user