From 714262bcf759a238daf906de16e7b204712a104f Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 14:28:21 +0100 Subject: Add usable item filter, projectile ESP and gravity-gun melee - Items: "Only if usable" hides health tags at full health and armor at full suit. Health ceiling is the server player's m_iMaxHealth; armor uses the server m_ArmorValue against HL2's 100 cap. Fails open when unreadable. - Projectiles: new Visuals feature/card for thrown grenades, RPG rockets, helicopter bombs and AR2 balls. Fuse from server m_flDetonateTime vs engine time; radius from m_DmgRadius with per-type fallback; optional 24-segment radius ring and FRAG timer label. - Melee: the killbot now handles the gravity gun as well; only VULNERABLE targets, 1200-unit range, primary attack to launch the held object, and no aim-punch compensation because the launch uses EyeVectors. - Server/netvars: m_ArmorValue, m_flDetonateTime, m_DmgRadius. --- src/hl2h.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/hl2h.h') diff --git a/src/hl2h.h b/src/hl2h.h index f1e72be..0c8ffb5 100644 --- a/src/hl2h.h +++ b/src/hl2h.h @@ -99,6 +99,7 @@ struct NetVars { int clr_render = -1; // client m_clrRender (entity render colour) int punch = -1; // client m_vecPunchAngle (aim punch) int default_fov = -1; // client m_iDefaultFOV (camera fov) + int dmg_radius = -1; // client C_BaseGrenade::m_DmgRadius // ponytail: mins/maxs may be absent from some HL2 netvar tables; esp.cpp falls back to h=72 bool ok() const { return flags >= 0 && velocity >= 0 && movetype >= 0; } // ponytail: m_iMaxHealth isn't a netvar in HL2 SP; esp.cpp falls back to 100. @@ -165,7 +166,8 @@ bool aimbot_apply(CUserCmd *cmd); bool triggerbot_apply(CUserCmd *cmd); bool silent_aim_apply(CUserCmd *cmd); bool melee_weapon_active(void *local_ent); -bool melee_aimbot_apply(CUserCmd *cmd); +bool gravity_gun_active(void *local_ent); +bool melee_aimbot_apply(CUserCmd *cmd, bool gravity); bool spread_control_apply(CUserCmd *cmd, void *local_ent); int spread_best_seed(int pellets); extern int g_spread_pellets; @@ -184,7 +186,8 @@ enum FeatureId { FEAT_WORLD_TINT = 11, FEAT_FOG = 12, FEAT_SKYBOX = 13, - FEAT_COUNT = 14 + FEAT_PROJECTILES = 14, + FEAT_COUNT = 15 }; enum EspOption { ESP_OPT_SHOW_NEUTRAL = 0, @@ -221,7 +224,8 @@ struct FeatureState { extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp, g_aimbot, g_triggerbot, g_silentaim, g_item_esp, g_fullbright, - g_world_tint, g_fog, g_skybox; + g_world_tint, g_fog, g_skybox, g_projectiles; +extern bool g_proj_fuse, g_proj_radius; extern bool g_tint_world_on, g_tint_sky_on, g_tint_prop_on; extern int g_tint_world_rgb[3], g_tint_sky_rgb[3], g_tint_prop_rgb[3]; extern bool g_fog_skybox, g_fog_disable; @@ -236,6 +240,7 @@ extern bool g_item_armor; extern bool g_item_weapons; extern bool g_item_crates; extern bool g_item_distance; +extern bool g_item_usable; extern int g_item_max_dist; extern bool g_aim_bones[AIM_BONE_COUNT]; extern int g_aim_smooth; @@ -289,6 +294,9 @@ int server_npc_relation(int idx, int local_idx); bool server_npc_has_follow_target(int idx); int server_npc_state(int idx); int server_npc_takedamage(int idx); +int server_player_armor(int idx); +float server_grenade_detonate(int idx); +float server_grenade_radius(int idx); int server_entity_count(); void *server_entity_base(int idx); const char *server_entity_classname(int idx); @@ -322,6 +330,7 @@ void draw_text_col(int x, int y, const char *s, int r, int g, int b); void draw_text_small_col(int x, int y, const char *s, int r, int g, int b); void esp_draw(); void esp_draw_items(); +void esp_draw_projectiles(); void prop_tint_update(); void studio_props_init(); bool world_to_screen(const Vector &w, float &sx, float &sy); -- cgit v1.2.3