summaryrefslogtreecommitdiffstats
path: root/src/menu.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 12:39:45 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 12:39:45 +0100
commit1fa3b61163b233f6c8c6b86dfa196fb798a6f094 (patch)
treee21fd421dcfc78ef6ec73883442a60cdb6fe6597 /src/menu.cpp
parentProps: remove studio diagnostics; document the prop tint path (diff)
downloadhl2h-1fa3b61163b233f6c8c6b86dfa196fb798a6f094.tar.gz
hl2h-1fa3b61163b233f6c8c6b86dfa196fb798a6f094.zip
ESP: classify NPC damage immunity/armour/vulnerability
- Resolve server m_takedamage (DAMAGE_NO/DAMAGE_EVENTS_ONLY = immune). - Classify gunship/strider/dropship as ARMORED (OnTakeDamage only accepts DMG_BLAST; only the RPG passes), and headcrab/antlion/manhack as VULN (gravity gun / physics impact). - ESP draws ARMORED/VULN/IMMUNE tags above the name (new "Damage tags" toggle, [esp] dmg). - Aimbot, silent aim, triggerbot and melee skip immune targets and armoured targets unless the active weapon is the RPG.
Diffstat (limited to '')
-rw-r--r--src/menu.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index 0ce6c05..eb1075a 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -78,7 +78,8 @@ bool g_aim_fov_circle = true;
78int g_silent_fov = 60; 78int g_silent_fov = 60;
79 79
80// ESP sub-options. Defaults match the pre-option behaviour: everything on. 80// ESP sub-options. Defaults match the pre-option behaviour: everything on.
81bool g_esp_opt[ESP_OPT_COUNT] = {true, true, true, true, true, true, true}; 81bool g_esp_opt[ESP_OPT_COUNT] = {true, true, true, true, true, true, true,
82 true};
82 83
83// --------------------------------------------------------------------------- 84// ---------------------------------------------------------------------------
84// config persistence (INI format) 85// config persistence (INI format)
@@ -221,12 +222,14 @@ void config_save() {
221 (int)g_item_ammo, (int)g_item_armor, (int)g_item_weapons, 222 (int)g_item_ammo, (int)g_item_armor, (int)g_item_weapons,
222 (int)g_item_crates, (int)g_item_distance, g_item_max_dist); 223 (int)g_item_crates, (int)g_item_distance, g_item_max_dist);
223 fprintf(f, "[esp]\nactive=%d\nbind=%d\nneutral=%d\nhealthbar=%d\n" 224 fprintf(f, "[esp]\nactive=%d\nbind=%d\nneutral=%d\nhealthbar=%d\n"
224 "healthnum=%d\nname=%d\nskeleton=%d\nbox=%d\nspeedgraph=%d\n", 225 "healthnum=%d\nname=%d\nskeleton=%d\nbox=%d\nspeedgraph=%d\n"
226 "dmg=%d\n",
225 g_esp.active, g_esp.bind, g_esp_opt[ESP_OPT_SHOW_NEUTRAL], 227 g_esp.active, g_esp.bind, g_esp_opt[ESP_OPT_SHOW_NEUTRAL],
226 g_esp_opt[ESP_OPT_SHOW_HEALTHBAR], 228 g_esp_opt[ESP_OPT_SHOW_HEALTHBAR],
227 g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], g_esp_opt[ESP_OPT_SHOW_NAME], 229 g_esp_opt[ESP_OPT_SHOW_HEALTHNUM], g_esp_opt[ESP_OPT_SHOW_NAME],
228 g_esp_opt[ESP_OPT_SHOW_SKELETON], g_esp_opt[ESP_OPT_SHOW_BOX], 230 g_esp_opt[ESP_OPT_SHOW_SKELETON], g_esp_opt[ESP_OPT_SHOW_BOX],
229 g_esp_opt[ESP_OPT_SHOW_SPEEDGRAPH]); 231 g_esp_opt[ESP_OPT_SHOW_SPEEDGRAPH],
232 g_esp_opt[ESP_OPT_DAMAGE_TAGS]);
230 gui_config_write(f); 233 gui_config_write(f);
231 bool ok = ferror(f) == 0; 234 bool ok = ferror(f) == 0;
232 if (fflush(f) != 0) 235 if (fflush(f) != 0)
@@ -427,6 +430,8 @@ static bool config_load() {
427 g_esp_opt[ESP_OPT_SHOW_BOX] = atoi(val) != 0; 430 g_esp_opt[ESP_OPT_SHOW_BOX] = atoi(val) != 0;
428 else if (strcmp(key, "speedgraph") == 0) 431 else if (strcmp(key, "speedgraph") == 0)
429 g_esp_opt[ESP_OPT_SHOW_SPEEDGRAPH] = atoi(val) != 0; 432 g_esp_opt[ESP_OPT_SHOW_SPEEDGRAPH] = atoi(val) != 0;
433 else if (strcmp(key, "dmg") == 0)
434 g_esp_opt[ESP_OPT_DAMAGE_TAGS] = atoi(val) != 0;
430 } 435 }
431 if (strcmp(key, "active") == 0) 436 if (strcmp(key, "active") == 0)
432 cur->active = atoi(val) != 0; 437 cur->active = atoi(val) != 0;