summaryrefslogtreecommitdiffstats
path: root/src/menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/menu.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index 2d4c660..0c022e4 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -45,6 +45,7 @@ FeatureState g_aimbot{true, 604}; // default Mouse5, rebindable in the GUI
45FeatureState g_triggerbot{true, 603}; // default Mouse4 45FeatureState g_triggerbot{true, 603}; // default Mouse4
46FeatureState g_silentaim{true, 602}; // default Mouse3 46FeatureState g_silentaim{true, 602}; // default Mouse3
47FeatureState g_item_esp{true, 0}; // valuable item tags, always-on by default 47FeatureState g_item_esp{true, 0}; // valuable item tags, always-on by default
48FeatureState g_fullbright{false, 0}; // mat_fullbright world lighting
48bool g_item_health = true; 49bool g_item_health = true;
49bool g_item_ammo = true; 50bool g_item_ammo = true;
50bool g_item_armor = true; 51bool g_item_armor = true;
@@ -184,6 +185,8 @@ void config_save() {
184 g_triggerbot.bind); 185 g_triggerbot.bind);
185 fprintf(f, "[silentaim]\nactive=%d\nbind=%d\nfov=%d\n", g_silentaim.active, 186 fprintf(f, "[silentaim]\nactive=%d\nbind=%d\nfov=%d\n", g_silentaim.active,
186 g_silentaim.bind, g_silent_fov); 187 g_silentaim.bind, g_silent_fov);
188 fprintf(f, "[fullbright]\nactive=%d\nbind=%d\n", g_fullbright.active,
189 g_fullbright.bind);
187 fprintf(f, "[items]\nactive=%d\nbind=%d\nhealth=%d\nammo=%d\n" 190 fprintf(f, "[items]\nactive=%d\nbind=%d\nhealth=%d\nammo=%d\n"
188 "armor=%d\nweapons=%d\ncrates=%d\ndistance=%d\nmax_dist=%d\n", 191 "armor=%d\nweapons=%d\ncrates=%d\ndistance=%d\nmax_dist=%d\n",
189 g_item_esp.active, g_item_esp.bind, (int)g_item_health, 192 g_item_esp.active, g_item_esp.bind, (int)g_item_health,
@@ -235,6 +238,8 @@ static bool config_load() {
235 cur = &g_esp; 238 cur = &g_esp;
236 else if (strstr(line, "[items]")) 239 else if (strstr(line, "[items]"))
237 cur = &g_item_esp; 240 cur = &g_item_esp;
241 else if (strstr(line, "[fullbright]"))
242 cur = &g_fullbright;
238 else if (strstr(line, "[aimbot]")) 243 else if (strstr(line, "[aimbot]"))
239 cur = &g_aimbot; 244 cur = &g_aimbot;
240 else if (strstr(line, "[triggerbot]")) 245 else if (strstr(line, "[triggerbot]"))
@@ -372,6 +377,7 @@ void config_reset_defaults() {
372 for (int i = 0; i < ESP_OPT_COUNT; i++) 377 for (int i = 0; i < ESP_OPT_COUNT; i++)
373 g_esp_opt[i] = true; 378 g_esp_opt[i] = true;
374 g_item_esp = {true, 0}; 379 g_item_esp = {true, 0};
380 g_fullbright = {false, 0};
375 g_item_health = true; 381 g_item_health = true;
376 g_item_ammo = true; 382 g_item_ammo = true;
377 g_item_armor = true; 383 g_item_armor = true;
@@ -488,7 +494,8 @@ static bool key_held(int sc) {
488static FeatureState *feature_state(int feature) { 494static FeatureState *feature_state(int feature) {
489 static FeatureState *feats[FEAT_COUNT] = { 495 static FeatureState *feats[FEAT_COUNT] = {
490 &g_bhop, &g_abh, &g_esp, &g_aimbot, &g_triggerbot, 496 &g_bhop, &g_abh, &g_esp, &g_aimbot, &g_triggerbot,
491 &g_silentaim, &g_jumpbug, &g_melee, &g_spread, &g_item_esp}; 497 &g_silentaim, &g_jumpbug, &g_melee, &g_spread, &g_item_esp,
498 &g_fullbright};
492 if (feature < 0 || feature >= FEAT_COUNT) 499 if (feature < 0 || feature >= FEAT_COUNT)
493 return nullptr; 500 return nullptr;
494 return feats[feature]; 501 return feats[feature];
@@ -658,6 +665,7 @@ void draw_text_col(int x, int y, const char *text, int r, int g, int b) {
658// PushMakeCurrent/PopMakeCurrent so they are submitted with a clean clip. 665// PushMakeCurrent/PopMakeCurrent so they are submitted with a clean clip.
659void outer_draw() { 666void outer_draw() {
660 poll_keyboard(); 667 poll_keyboard();
668 fullbright_update();
661 gui_handle_input(); 669 gui_handle_input();
662 // HL2H_DRAW_TEST=1 draws a probe rect without needing the GUI open 670 // HL2H_DRAW_TEST=1 draws a probe rect without needing the GUI open
663 static bool draw_test = getenv("HL2H_DRAW_TEST") != nullptr; 671 static bool draw_test = getenv("HL2H_DRAW_TEST") != nullptr;