summaryrefslogtreecommitdiffstats
path: root/src/hl2h.h
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 14:28:21 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 14:28:21 +0100
commit714262bcf759a238daf906de16e7b204712a104f (patch)
treed208ecfbbdb0f5f2f27aa888c806e38198ad1d52 /src/hl2h.h
parentRemove gamma slider; keep HDR brightness (diff)
downloadhl2h-714262bcf759a238daf906de16e7b204712a104f.tar.gz
hl2h-714262bcf759a238daf906de16e7b204712a104f.zip
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.
Diffstat (limited to '')
-rw-r--r--src/hl2h.h15
1 files changed, 12 insertions, 3 deletions
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 {
99 int clr_render = -1; // client m_clrRender (entity render colour) 99 int clr_render = -1; // client m_clrRender (entity render colour)
100 int punch = -1; // client m_vecPunchAngle (aim punch) 100 int punch = -1; // client m_vecPunchAngle (aim punch)
101 int default_fov = -1; // client m_iDefaultFOV (camera fov) 101 int default_fov = -1; // client m_iDefaultFOV (camera fov)
102 int dmg_radius = -1; // client C_BaseGrenade::m_DmgRadius
102 // ponytail: mins/maxs may be absent from some HL2 netvar tables; esp.cpp falls back to h=72 103 // ponytail: mins/maxs may be absent from some HL2 netvar tables; esp.cpp falls back to h=72
103 bool ok() const { return flags >= 0 && velocity >= 0 && movetype >= 0; } 104 bool ok() const { return flags >= 0 && velocity >= 0 && movetype >= 0; }
104 // ponytail: m_iMaxHealth isn't a netvar in HL2 SP; esp.cpp falls back to 100. 105 // 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);
165bool triggerbot_apply(CUserCmd *cmd); 166bool triggerbot_apply(CUserCmd *cmd);
166bool silent_aim_apply(CUserCmd *cmd); 167bool silent_aim_apply(CUserCmd *cmd);
167bool melee_weapon_active(void *local_ent); 168bool melee_weapon_active(void *local_ent);
168bool melee_aimbot_apply(CUserCmd *cmd); 169bool gravity_gun_active(void *local_ent);
170bool melee_aimbot_apply(CUserCmd *cmd, bool gravity);
169bool spread_control_apply(CUserCmd *cmd, void *local_ent); 171bool spread_control_apply(CUserCmd *cmd, void *local_ent);
170int spread_best_seed(int pellets); 172int spread_best_seed(int pellets);
171extern int g_spread_pellets; 173extern int g_spread_pellets;
@@ -184,7 +186,8 @@ enum FeatureId {
184 FEAT_WORLD_TINT = 11, 186 FEAT_WORLD_TINT = 11,
185 FEAT_FOG = 12, 187 FEAT_FOG = 12,
186 FEAT_SKYBOX = 13, 188 FEAT_SKYBOX = 13,
187 FEAT_COUNT = 14 189 FEAT_PROJECTILES = 14,
190 FEAT_COUNT = 15
188}; 191};
189enum EspOption { 192enum EspOption {
190 ESP_OPT_SHOW_NEUTRAL = 0, 193 ESP_OPT_SHOW_NEUTRAL = 0,
@@ -221,7 +224,8 @@ struct FeatureState {
221 224
222extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp, 225extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp,
223 g_aimbot, g_triggerbot, g_silentaim, g_item_esp, g_fullbright, 226 g_aimbot, g_triggerbot, g_silentaim, g_item_esp, g_fullbright,
224 g_world_tint, g_fog, g_skybox; 227 g_world_tint, g_fog, g_skybox, g_projectiles;
228extern bool g_proj_fuse, g_proj_radius;
225extern bool g_tint_world_on, g_tint_sky_on, g_tint_prop_on; 229extern bool g_tint_world_on, g_tint_sky_on, g_tint_prop_on;
226extern int g_tint_world_rgb[3], g_tint_sky_rgb[3], g_tint_prop_rgb[3]; 230extern int g_tint_world_rgb[3], g_tint_sky_rgb[3], g_tint_prop_rgb[3];
227extern bool g_fog_skybox, g_fog_disable; 231extern bool g_fog_skybox, g_fog_disable;
@@ -236,6 +240,7 @@ extern bool g_item_armor;
236extern bool g_item_weapons; 240extern bool g_item_weapons;
237extern bool g_item_crates; 241extern bool g_item_crates;
238extern bool g_item_distance; 242extern bool g_item_distance;
243extern bool g_item_usable;
239extern int g_item_max_dist; 244extern int g_item_max_dist;
240extern bool g_aim_bones[AIM_BONE_COUNT]; 245extern bool g_aim_bones[AIM_BONE_COUNT];
241extern int g_aim_smooth; 246extern int g_aim_smooth;
@@ -289,6 +294,9 @@ int server_npc_relation(int idx, int local_idx);
289bool server_npc_has_follow_target(int idx); 294bool server_npc_has_follow_target(int idx);
290int server_npc_state(int idx); 295int server_npc_state(int idx);
291int server_npc_takedamage(int idx); 296int server_npc_takedamage(int idx);
297int server_player_armor(int idx);
298float server_grenade_detonate(int idx);
299float server_grenade_radius(int idx);
292int server_entity_count(); 300int server_entity_count();
293void *server_entity_base(int idx); 301void *server_entity_base(int idx);
294const char *server_entity_classname(int idx); 302const 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);
322void draw_text_small_col(int x, int y, const char *s, int r, int g, int b); 330void draw_text_small_col(int x, int y, const char *s, int r, int g, int b);
323void esp_draw(); 331void esp_draw();
324void esp_draw_items(); 332void esp_draw_items();
333void esp_draw_projectiles();
325void prop_tint_update(); 334void prop_tint_update();
326void studio_props_init(); 335void studio_props_init();
327bool world_to_screen(const Vector &w, float &sx, float &sy); 336bool world_to_screen(const Vector &w, float &sx, float &sy);