diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-27 14:52:00 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-27 14:52:24 +0100 |
| commit | 293eda2bdce9d732fad168b5b6838bd89ce59fe8 (patch) | |
| tree | 9f345d4a19d1957ccfd7764012221d62eb2df328 /src/hl2h.h | |
| parent | Menu: latch the Insert key and expand the root on open (diff) | |
| download | hl2h-293eda2bdce9d732fad168b5b6838bd89ce59fe8.tar.gz hl2h-293eda2bdce9d732fad168b5b6838bd89ce59fe8.zip | |
Melee killbot: 360-degree crowbar silent aim
- New feature (default on): while the local player's active weapon is the
crowbar, pick the nearest visible hostile NPC within the 75-unit crowbar
range, sorted by distance to its collision AABB, and attack it through the
normal silent-aim path (usercmd view + IN_ATTACK, movement preserved,
rendered view restored at FRAME_RENDER_START).
- Prefer the nearest visible hitbox center; fall back to the AABB center /
closest point when bones are unavailable. Reuses the existing friendly /
neutral and life-state filters and the world-only vischeck.
- Detect the active weapon from the client m_hActiveWeapon handle, with the
authoritative server m_hActiveWeapon handle as a fallback (client entity
index from the low 16 bits).
- While the crowbar is active and this feature is on, skip the gun aimbot,
triggerbot and silent aim so they do not fight over the usercmd view.
- Menu: Melee killbot -> Active; config [melee] active=...
Diffstat (limited to '')
| -rw-r--r-- | src/hl2h.h | 7 |
1 files changed, 6 insertions, 1 deletions
| @@ -82,6 +82,7 @@ struct NetVars { | |||
| 82 | int lifestate = -1; | 82 | int lifestate = -1; |
| 83 | int modelindex = -1; | 83 | int modelindex = -1; |
| 84 | int absvelocity = -1; // client C_BaseEntity::m_vecAbsVelocity (prediction) | 84 | int absvelocity = -1; // client C_BaseEntity::m_vecAbsVelocity (prediction) |
| 85 | int activeweapon = -1; // client m_hActiveWeapon handle | ||
| 85 | // ponytail: mins/maxs may be absent from some HL2 netvar tables; esp.cpp falls back to h=72 | 86 | // ponytail: mins/maxs may be absent from some HL2 netvar tables; esp.cpp falls back to h=72 |
| 86 | bool ok() const { return flags >= 0 && velocity >= 0 && movetype >= 0; } | 87 | bool ok() const { return flags >= 0 && velocity >= 0 && movetype >= 0; } |
| 87 | // ponytail: m_iMaxHealth isn't a netvar in HL2 SP; esp.cpp falls back to 100. | 88 | // ponytail: m_iMaxHealth isn't a netvar in HL2 SP; esp.cpp falls back to 100. |
| @@ -147,6 +148,8 @@ float getfov(const QAngle &my_view, const QAngle &aim_ang); | |||
| 147 | bool aimbot_apply(CUserCmd *cmd); | 148 | bool aimbot_apply(CUserCmd *cmd); |
| 148 | bool triggerbot_apply(CUserCmd *cmd); | 149 | bool triggerbot_apply(CUserCmd *cmd); |
| 149 | bool silent_aim_apply(CUserCmd *cmd); | 150 | bool silent_aim_apply(CUserCmd *cmd); |
| 151 | bool melee_weapon_active(void *local_ent); | ||
| 152 | bool melee_aimbot_apply(CUserCmd *cmd); | ||
| 150 | enum FeatureId { | 153 | enum FeatureId { |
| 151 | FEAT_BHOP = 0, | 154 | FEAT_BHOP = 0, |
| 152 | FEAT_ABH = 1, | 155 | FEAT_ABH = 1, |
| @@ -154,7 +157,8 @@ enum FeatureId { | |||
| 154 | FEAT_AIMBOT = 3, | 157 | FEAT_AIMBOT = 3, |
| 155 | FEAT_TRIGGERBOT = 4, | 158 | FEAT_TRIGGERBOT = 4, |
| 156 | FEAT_SILENTAIM = 5, | 159 | FEAT_SILENTAIM = 5, |
| 157 | FEAT_JUMPBUG = 6 | 160 | FEAT_JUMPBUG = 6, |
| 161 | FEAT_MELEE = 7 | ||
| 158 | }; | 162 | }; |
| 159 | enum EspOption { | 163 | enum EspOption { |
| 160 | ESP_OPT_SHOW_NEUTRAL = 0, | 164 | ESP_OPT_SHOW_NEUTRAL = 0, |
| @@ -179,6 +183,7 @@ void resolve_netvars(); | |||
| 179 | bool resolve_server_netvars(); | 183 | bool resolve_server_netvars(); |
| 180 | int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); | 184 | int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); |
| 181 | bool server_set_velocity_z(int idx, float vz); | 185 | bool server_set_velocity_z(int idx, float vz); |
| 186 | int server_active_weapon(int idx); | ||
| 182 | int server_model_index(void *base); | 187 | int server_model_index(void *base); |
| 183 | void find_modules(); | 188 | void find_modules(); |
| 184 | void init_conmsg(); | 189 | void init_conmsg(); |
