summaryrefslogtreecommitdiffstats
path: root/src/menu.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-27 21:37:41 +0100
committersalmonik <salmonik@tuta.io>2026-10-27 21:37:41 +0100
commit77bd6ba7054b19332dc357e866f158321ec889fb (patch)
tree741c046d925bd1dbfc8af935954f3eab6c027660 /src/menu.cpp
parentItem ESP: tag breakable wood/plastic/metal crates (diff)
downloadhl2h-77bd6ba7054b19332dc357e866f158321ec889fb.tar.gz
hl2h-77bd6ba7054b19332dc357e866f158321ec889fb.zip
Item ESP: tag world weapons, name ammo types, restrict crates
- Add a Weapons category and classify world weapon models (crowbar, pistol, revolver, SMG, AR2, shotgun, crossbow, RPG, grenade, gravity gun, stunstick, bugbait, sniper). Skip the active weapon and anything with a valid m_hOwner/m_hOwnerEntity handle so held weapons do not tag. - Label ammo by model: pistol, SMG, AR2, .357, crossbow, shotgun, sniper, flares, AR2 grenade, RPG rocket and specific ammo-crate variants. - Only item_item_crate and item_beacon_crate are supply crates; generic breakable crates are no longer tagged. Crate chunks stay excluded. - Add item diagnostics: category state, prop-like entities with class/model/ kind/distance/origin, and every item crate seen.
Diffstat (limited to 'src/menu.cpp')
-rw-r--r--src/menu.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index af8d10d..69c3b45 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -48,6 +48,7 @@ FeatureState g_item_esp{true, 0}; // valuable item tags, always-on by default
48bool g_item_health = true; 48bool g_item_health = true;
49bool g_item_ammo = true; 49bool g_item_ammo = true;
50bool g_item_armor = true; 50bool g_item_armor = true;
51bool g_item_weapons = true;
51bool g_item_crates = true; 52bool g_item_crates = true;
52bool g_item_distance = true; 53bool g_item_distance = true;
53int g_item_max_dist = 2500; 54int g_item_max_dist = 2500;
@@ -184,10 +185,10 @@ void config_save() {
184 fprintf(f, "[silentaim]\nactive=%d\nbind=%d\nfov=%d\n", g_silentaim.active, 185 fprintf(f, "[silentaim]\nactive=%d\nbind=%d\nfov=%d\n", g_silentaim.active,
185 g_silentaim.bind, g_silent_fov); 186 g_silentaim.bind, g_silent_fov);
186 fprintf(f, "[items]\nactive=%d\nbind=%d\nhealth=%d\nammo=%d\n" 187 fprintf(f, "[items]\nactive=%d\nbind=%d\nhealth=%d\nammo=%d\n"
187 "armor=%d\ncrates=%d\ndistance=%d\nmax_dist=%d\n", 188 "armor=%d\nweapons=%d\ncrates=%d\ndistance=%d\nmax_dist=%d\n",
188 g_item_esp.active, g_item_esp.bind, (int)g_item_health, 189 g_item_esp.active, g_item_esp.bind, (int)g_item_health,
189 (int)g_item_ammo, (int)g_item_armor, (int)g_item_crates, 190 (int)g_item_ammo, (int)g_item_armor, (int)g_item_weapons,
190 (int)g_item_distance, g_item_max_dist); 191 (int)g_item_crates, (int)g_item_distance, g_item_max_dist);
191 fprintf(f, "[esp]\nactive=%d\nbind=%d\nneutral=%d\nhealthbar=%d\n" 192 fprintf(f, "[esp]\nactive=%d\nbind=%d\nneutral=%d\nhealthbar=%d\n"
192 "healthnum=%d\nname=%d\nskeleton=%d\nbox=%d\nspeedgraph=%d\n", 193 "healthnum=%d\nname=%d\nskeleton=%d\nbox=%d\nspeedgraph=%d\n",
193 g_esp.active, g_esp.bind, g_esp_opt[ESP_OPT_SHOW_NEUTRAL], 194 g_esp.active, g_esp.bind, g_esp_opt[ESP_OPT_SHOW_NEUTRAL],
@@ -271,6 +272,8 @@ static bool config_load() {
271 g_item_ammo = atoi(val) != 0; 272 g_item_ammo = atoi(val) != 0;
272 else if (strcmp(key, "armor") == 0) 273 else if (strcmp(key, "armor") == 0)
273 g_item_armor = atoi(val) != 0; 274 g_item_armor = atoi(val) != 0;
275 else if (strcmp(key, "weapons") == 0)
276 g_item_weapons = atoi(val) != 0;
274 else if (strcmp(key, "crates") == 0) 277 else if (strcmp(key, "crates") == 0)
275 g_item_crates = atoi(val) != 0; 278 g_item_crates = atoi(val) != 0;
276 else if (strcmp(key, "distance") == 0) 279 else if (strcmp(key, "distance") == 0)
@@ -372,6 +375,7 @@ void config_reset_defaults() {
372 g_item_health = true; 375 g_item_health = true;
373 g_item_ammo = true; 376 g_item_ammo = true;
374 g_item_armor = true; 377 g_item_armor = true;
378 g_item_weapons = true;
375 g_item_crates = true; 379 g_item_crates = true;
376 g_item_distance = true; 380 g_item_distance = true;
377 g_item_max_dist = 2500; 381 g_item_max_dist = 2500;