summaryrefslogtreecommitdiffstats
path: root/src/menu.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 23:26:53 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 23:26:53 +0100
commit074e315c8550712dce0c7b530a90eee6aca29e63 (patch)
treefc5d6ecf6dce582971f0c3878b68f4714b8e6fba /src/menu.cpp
parentChams: working alpha via RenderView blend and a custom VMT (diff)
downloadhl2h-074e315c8550712dce0c7b530a90eee6aca29e63.tar.gz
hl2h-074e315c8550712dce0c7b530a90eee6aca29e63.zip
Add grenade trajectory, RPG armour priority, empty chargers, mega gravity gun
- Projectiles gets a "Grenade trajectory" toggle. While a frag grenade is held, simulate the weapon_frag throw (1200 u/s forward + 120 z, player velocity, gravity 600) and trace each step with a new trace_solid_segment(); reflect on impact, stop on a slow upward-normal hit, and draw the path, landing cross and a 300-unit blast ring. Verified on :99 (arcs, bounces off the tunnel wall, lands). - With the RPG equipped, armoured NPCs (striders, gunships, dropships, hunter-choppers) sort before normal enemies during target acquisition. Added helicopter/chopper to the ARMORED model list. - Empty health/suit chargers are hidden: read m_iJuice from the server datamap (0 = depleted, -1 = unreadable/fail open). - The citadel supercharged gravity gun (d3_citadel_03, d3_citadel_04, d3_breen_01 via IVEngineClient::GetLevelName) is treated as a normal weapon, so the melee aimbot no longer restricts it to VULNERABLE NPCs.
Diffstat (limited to 'src/menu.cpp')
-rw-r--r--src/menu.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index 873f5ed..1064365 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -63,6 +63,7 @@ FeatureState g_skybox{false, 0}; // skybox.png image override
63FeatureState g_projectiles{true, 0}; // grenade / rocket ESP 63FeatureState g_projectiles{true, 0}; // grenade / rocket ESP
64bool g_proj_fuse = true; 64bool g_proj_fuse = true;
65bool g_proj_radius = true; 65bool g_proj_radius = true;
66bool g_proj_traj = true;
66FeatureState g_chams{false, 0}; 67FeatureState g_chams{false, 0};
67ChamsGroup g_chams_hostile{true, 3, {255, 60, 60, 255}, true, 3, 68ChamsGroup g_chams_hostile{true, 3, {255, 60, 60, 255}, true, 3,
68 {255, 60, 60, 255}}; 69 {255, 60, 60, 255}};
@@ -241,9 +242,10 @@ void config_save() {
241 g_fog_start, g_fog_end, (int)g_fog_skybox, (int)g_fog_disable); 242 g_fog_start, g_fog_end, (int)g_fog_skybox, (int)g_fog_disable);
242 fprintf(f, "[skybox]\nactive=%d\nbind=%d\n", g_skybox.active, 243 fprintf(f, "[skybox]\nactive=%d\nbind=%d\n", g_skybox.active,
243 g_skybox.bind); 244 g_skybox.bind);
244 fprintf(f, "[projectiles]\nactive=%d\nbind=%d\nfuse=%d\nradius=%d\n", 245 fprintf(f, "[projectiles]\nactive=%d\nbind=%d\nfuse=%d\nradius=%d\n"
246 "trajectory=%d\n",
245 g_projectiles.active, g_projectiles.bind, (int)g_proj_fuse, 247 g_projectiles.active, g_projectiles.bind, (int)g_proj_fuse,
246 (int)g_proj_radius); 248 (int)g_proj_radius, (int)g_proj_traj);
247 fprintf(f, "[chams]\nactive=%d\nbind=%d\n", g_chams.active, g_chams.bind); 249 fprintf(f, "[chams]\nactive=%d\nbind=%d\n", g_chams.active, g_chams.bind);
248 auto save_chams = [&](const char *name, const ChamsGroup &g) { 250 auto save_chams = [&](const char *name, const ChamsGroup &g) {
249 fprintf(f, "[%s]\nvis=%d\nvis_mat=%d\nvis_r=%d\nvis_g=%d\nvis_b=%d\n" 251 fprintf(f, "[%s]\nvis=%d\nvis_mat=%d\nvis_r=%d\nvis_g=%d\nvis_b=%d\n"
@@ -425,6 +427,8 @@ static bool config_load() {
425 g_proj_fuse = atoi(val) != 0; 427 g_proj_fuse = atoi(val) != 0;
426 else if (strcmp(key, "radius") == 0) 428 else if (strcmp(key, "radius") == 0)
427 g_proj_radius = atoi(val) != 0; 429 g_proj_radius = atoi(val) != 0;
430 else if (strcmp(key, "trajectory") == 0)
431 g_proj_traj = atoi(val) != 0;
428 } 432 }
429 if (chams_grp) { 433 if (chams_grp) {
430 ChamsGroup &g = *chams_grp; 434 ChamsGroup &g = *chams_grp;
@@ -702,6 +706,7 @@ void config_reset_defaults() {
702 g_projectiles = {true, 0}; 706 g_projectiles = {true, 0};
703 g_proj_fuse = true; 707 g_proj_fuse = true;
704 g_proj_radius = true; 708 g_proj_radius = true;
709 g_proj_traj = true;
705 g_chams = {false, 0}; 710 g_chams = {false, 0};
706 g_chams_hostile = {true, 3, {255, 60, 60, 255}, true, 3, 711 g_chams_hostile = {true, 3, {255, 60, 60, 255}, true, 3,
707 {255, 60, 60, 255}}; 712 {255, 60, 60, 255}};