summaryrefslogtreecommitdiffstats
path: root/src/features.h
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-06 16:21:27 +0100
committersalmonik <salmonik@tuta.io>2026-11-06 16:21:27 +0100
commit3c27e7ce262e612fa75c6e6f090e04041a688861 (patch)
tree1c2bfd6accea27904dc9d81a61624905b220a8a0 /src/features.h
parentHooks: central vtable install with restore support (diff)
downloadhl2h-3c27e7ce262e612fa75c6e6f090e04041a688861.tar.gz
hl2h-3c27e7ce262e612fa75c6e6f090e04041a688861.zip
Headers: split the shared header by declaration group
hl2h.h becomes an umbrella over core.h (logging, init stage, module snapshots, interfaces, netvars, CUserCmd, engine constants, vector math), settings.h (feature ids, feature state, user settings) and features.h (cross-module declarations). Translation units keep including hl2h.h, so this only moves declarations.
Diffstat (limited to '')
-rw-r--r--src/features.h136
1 files changed, 136 insertions, 0 deletions
diff --git a/src/features.h b/src/features.h
new file mode 100644
index 0000000..6890aa6
--- /dev/null
+++ b/src/features.h
@@ -0,0 +1,136 @@
1#ifndef HL2H_FEATURES_H
2#define HL2H_FEATURES_H
3
4#include "core.h"
5#include "settings.h"
6
7// ---------------------------------------------------------------------------
8// combat
9// ---------------------------------------------------------------------------
10bool aimbot_apply(CUserCmd *cmd);
11bool triggerbot_apply(CUserCmd *cmd);
12bool silent_aim_apply(CUserCmd *cmd);
13bool melee_weapon_active(void *local_ent);
14bool gravity_gun_active(void *local_ent);
15bool melee_aimbot_apply(CUserCmd *cmd, bool gravity);
16bool spread_control_apply(CUserCmd *cmd, void *local_ent);
17int spread_best_seed(int pellets);
18
19// ---------------------------------------------------------------------------
20// cross-file declarations
21// ---------------------------------------------------------------------------
22void note_modified(const CUserCmd *cmd, int flags, const float *vel);
23CUserCmd *get_usercmd(int seq);
24void input_clear_mouse_states();
25void fix_verified_crc(int seq, uint32_t crc);
26uint32_t usercmd_checksum(const CUserCmd *c);
27bool find_input_global();
28void resolve_netvars();
29bool console_cmd(const char *cmd);
30bool cvar_set_int(const char *name, int value);
31void fullbright_update();
32void fullbright_invalidate();
33void world_tint_update();
34void world_tint_invalidate();
35void fog_update();
36void fog_invalidate();
37void skybox_update();
38void skybox_invalidate();
39void skybox_reload_image();
40bool resolve_server_netvars();
41int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out);
42// Authoritative server velocity; client-side m_vecVelocity is not networked for
43// NPCs. Returns false when the server interface or datamap field is missing.
44bool server_entity_velocity(int idx, Vector *out);
45bool server_set_velocity_z(int idx, float vz);
46int server_active_weapon(int idx);
47int server_npc_relation(int idx, int local_idx);
48bool server_npc_has_follow_target(int idx);
49int server_npc_state(int idx);
50int server_npc_takedamage(int idx);
51int server_player_armor(int idx);
52int server_player_ammo(int idx, int type);
53uint32_t server_player_weapon(int idx, int slot);
54float server_grenade_detonate(int idx);
55float server_grenade_radius(int idx);
56int server_grenade_thrower(int idx);
57int server_item_juice(int idx);
58int server_entity_count();
59void *server_entity_base(int idx);
60const char *server_entity_classname(int idx);
61bool server_trigger_info(int idx, char *map, size_t mapn, Vector &mins,
62 Vector &maxs);
63int server_npc_turret_flags(int idx);
64int server_model_index(void *base);
65void find_modules();
66bool module_jump_slot(const char *path, const char *name, uintptr_t *vaddr,
67 uintptr_t *bias);
68void init_conmsg();
69bool feature_active(int feature); // enabled AND bind held (or unbound)
70bool feature_enabled(int feature); // enabled, regardless of bind
71bool feature_has_bind(int feature);
72bool feature_bind_held(int feature);
73bool esp_option(int opt);
74bool bhop_autostrafe_enabled();
75bool jumpbug_assist_enabled();
76bool spread_no_spread_enabled();
77bool spread_engine_enabled();
78bool aim_punch_enabled();
79unsigned aimbot_bone_mask();
80int aimbot_smooth_step();
81bool aimbot_vischeck_enabled();
82int aimbot_fov();
83bool aimbot_fov_circle();
84void aimbot_reset_lock();
85void silentaim_reset_lock();
86void *entitylist_get(int idx);
87bool esp_is_npc_index(int idx);
88bool esp_is_viewmodel_index(int idx);
89int esp_npc_relation(int idx);
90void *world_find_material(const char *name);
91void chams_init();
92void chams_preload();
93int engine_get_local_player();
94void draw_text_col(int x, int y, const char *s, int r, int g, int b);
95void draw_text_small_col(int x, int y, const char *s, int r, int g, int b);
96void esp_draw();
97void esp_draw_fov_circle(); // aimbot cone, independent of the ESP toggle
98void esp_reset_session(); // map change / respawn: clear per-map latches
99void esp_draw_items();
100void esp_draw_projectiles();
101void prop_tint_update();
102void studio_props_init();
103bool world_to_screen(const Vector &w, float &sx, float &sy);
104void set_silent_restore(const QAngle &angles);
105bool is_visible(const Vector &eye, const Vector &point,
106 void *self = nullptr, void *target = nullptr);
107void *trace_entity(const Vector &start, const Vector &end, void *ignore);
108bool trace_solid_segment(const Vector &start, const Vector &end, void *ignore,
109 Vector &out_end, Vector &out_normal);
110float ground_distance(const Vector &origin, void *ignore, float max_dist);
111bool point_ground(const Vector &point, void *ignore);
112
113// bones.cpp — client-side animated skeleton / hitbox access (see there)
114bool bones_update(int idx, void *ent);
115int bones_count(int idx);
116int bone_find(int idx, const char *name);
117int bone_parent(int idx, int bone);
118bool bone_pos(int idx, int bone, Vector &out);
119bool bone_is_skeleton_core(int idx, int bone);
120int bone_nearest_core_parent(int idx, int bone);
121bool bones_is_humanoid(int idx);
122bool hitbox_center(int idx, const char *hitbox_name, Vector &out);
123void bones_clear();
124bool head_position(int idx, Vector &out);
125int aim_points(int idx, unsigned group_mask, Vector *out, int max);
126
127void outer_draw();
128void gui_handle_input();
129void gui_draw();
130bool gui_is_open();
131bool gui_bind_capture_active();
132QAngle gui_frozen_view();
133void gui_config_init();
134void gui_config_write(FILE *f);
135
136#endif