diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 14:28:21 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 14:28:21 +0100 |
| commit | 714262bcf759a238daf906de16e7b204712a104f (patch) | |
| tree | d208ecfbbdb0f5f2f27aa888c806e38198ad1d52 /src/hl2h.h | |
| parent | Remove gamma slider; keep HDR brightness (diff) | |
| download | hl2h-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.h | 15 |
1 files changed, 12 insertions, 3 deletions
| @@ -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); | |||
| 165 | bool triggerbot_apply(CUserCmd *cmd); | 166 | bool triggerbot_apply(CUserCmd *cmd); |
| 166 | bool silent_aim_apply(CUserCmd *cmd); | 167 | bool silent_aim_apply(CUserCmd *cmd); |
| 167 | bool melee_weapon_active(void *local_ent); | 168 | bool melee_weapon_active(void *local_ent); |
| 168 | bool melee_aimbot_apply(CUserCmd *cmd); | 169 | bool gravity_gun_active(void *local_ent); |
| 170 | bool melee_aimbot_apply(CUserCmd *cmd, bool gravity); | ||
| 169 | bool spread_control_apply(CUserCmd *cmd, void *local_ent); | 171 | bool spread_control_apply(CUserCmd *cmd, void *local_ent); |
| 170 | int spread_best_seed(int pellets); | 172 | int spread_best_seed(int pellets); |
| 171 | extern int g_spread_pellets; | 173 | extern 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 | }; |
| 189 | enum EspOption { | 192 | enum EspOption { |
| 190 | ESP_OPT_SHOW_NEUTRAL = 0, | 193 | ESP_OPT_SHOW_NEUTRAL = 0, |
| @@ -221,7 +224,8 @@ struct FeatureState { | |||
| 221 | 224 | ||
| 222 | extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp, | 225 | extern 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; |
| 228 | extern bool g_proj_fuse, g_proj_radius; | ||
| 225 | extern bool g_tint_world_on, g_tint_sky_on, g_tint_prop_on; | 229 | extern bool g_tint_world_on, g_tint_sky_on, g_tint_prop_on; |
| 226 | extern int g_tint_world_rgb[3], g_tint_sky_rgb[3], g_tint_prop_rgb[3]; | 230 | extern int g_tint_world_rgb[3], g_tint_sky_rgb[3], g_tint_prop_rgb[3]; |
| 227 | extern bool g_fog_skybox, g_fog_disable; | 231 | extern bool g_fog_skybox, g_fog_disable; |
| @@ -236,6 +240,7 @@ extern bool g_item_armor; | |||
| 236 | extern bool g_item_weapons; | 240 | extern bool g_item_weapons; |
| 237 | extern bool g_item_crates; | 241 | extern bool g_item_crates; |
| 238 | extern bool g_item_distance; | 242 | extern bool g_item_distance; |
| 243 | extern bool g_item_usable; | ||
| 239 | extern int g_item_max_dist; | 244 | extern int g_item_max_dist; |
| 240 | extern bool g_aim_bones[AIM_BONE_COUNT]; | 245 | extern bool g_aim_bones[AIM_BONE_COUNT]; |
| 241 | extern int g_aim_smooth; | 246 | extern int g_aim_smooth; |
| @@ -289,6 +294,9 @@ int server_npc_relation(int idx, int local_idx); | |||
| 289 | bool server_npc_has_follow_target(int idx); | 294 | bool server_npc_has_follow_target(int idx); |
| 290 | int server_npc_state(int idx); | 295 | int server_npc_state(int idx); |
| 291 | int server_npc_takedamage(int idx); | 296 | int server_npc_takedamage(int idx); |
| 297 | int server_player_armor(int idx); | ||
| 298 | float server_grenade_detonate(int idx); | ||
| 299 | float server_grenade_radius(int idx); | ||
| 292 | int server_entity_count(); | 300 | int server_entity_count(); |
| 293 | void *server_entity_base(int idx); | 301 | void *server_entity_base(int idx); |
| 294 | const char *server_entity_classname(int idx); | 302 | 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); | |||
| 322 | void draw_text_small_col(int x, int y, const char *s, int r, int g, int b); | 330 | void draw_text_small_col(int x, int y, const char *s, int r, int g, int b); |
| 323 | void esp_draw(); | 331 | void esp_draw(); |
| 324 | void esp_draw_items(); | 332 | void esp_draw_items(); |
| 333 | void esp_draw_projectiles(); | ||
| 325 | void prop_tint_update(); | 334 | void prop_tint_update(); |
| 326 | void studio_props_init(); | 335 | void studio_props_init(); |
| 327 | bool world_to_screen(const Vector &w, float &sx, float &sy); | 336 | bool world_to_screen(const Vector &w, float &sx, float &sy); |
