From 4b7dd1ca76ff0f97d53038ac9a11165f2fc68528 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 3 Nov 2026 22:22:08 +0100 Subject: World: add Fullbright visual feature - New Visuals card with the usual Active + Bind; default off. Unbound+Active is always-on, a bind makes it hold-to-brighten. - Resolve VEngineCvar004 and set mat_fullbright 1/0 through FindVar (slot 12) and ConVar::SetValue(int) (slot 11), bypassing the console cheat gate. Fall back to ClientCmd if the cvar interface is unavailable. - Reapply after map loads/respawns and persist [fullbright] active/bind. - Log on/off; show an error toast if the cvar cannot be applied. --- src/menu.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/menu.cpp') 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 FeatureState g_triggerbot{true, 603}; // default Mouse4 FeatureState g_silentaim{true, 602}; // default Mouse3 FeatureState g_item_esp{true, 0}; // valuable item tags, always-on by default +FeatureState g_fullbright{false, 0}; // mat_fullbright world lighting bool g_item_health = true; bool g_item_ammo = true; bool g_item_armor = true; @@ -184,6 +185,8 @@ void config_save() { g_triggerbot.bind); fprintf(f, "[silentaim]\nactive=%d\nbind=%d\nfov=%d\n", g_silentaim.active, g_silentaim.bind, g_silent_fov); + fprintf(f, "[fullbright]\nactive=%d\nbind=%d\n", g_fullbright.active, + g_fullbright.bind); fprintf(f, "[items]\nactive=%d\nbind=%d\nhealth=%d\nammo=%d\n" "armor=%d\nweapons=%d\ncrates=%d\ndistance=%d\nmax_dist=%d\n", g_item_esp.active, g_item_esp.bind, (int)g_item_health, @@ -235,6 +238,8 @@ static bool config_load() { cur = &g_esp; else if (strstr(line, "[items]")) cur = &g_item_esp; + else if (strstr(line, "[fullbright]")) + cur = &g_fullbright; else if (strstr(line, "[aimbot]")) cur = &g_aimbot; else if (strstr(line, "[triggerbot]")) @@ -372,6 +377,7 @@ void config_reset_defaults() { for (int i = 0; i < ESP_OPT_COUNT; i++) g_esp_opt[i] = true; g_item_esp = {true, 0}; + g_fullbright = {false, 0}; g_item_health = true; g_item_ammo = true; g_item_armor = true; @@ -488,7 +494,8 @@ static bool key_held(int sc) { static FeatureState *feature_state(int feature) { static FeatureState *feats[FEAT_COUNT] = { &g_bhop, &g_abh, &g_esp, &g_aimbot, &g_triggerbot, - &g_silentaim, &g_jumpbug, &g_melee, &g_spread, &g_item_esp}; + &g_silentaim, &g_jumpbug, &g_melee, &g_spread, &g_item_esp, + &g_fullbright}; if (feature < 0 || feature >= FEAT_COUNT) return nullptr; return feats[feature]; @@ -658,6 +665,7 @@ void draw_text_col(int x, int y, const char *text, int r, int g, int b) { // PushMakeCurrent/PopMakeCurrent so they are submitted with a clean clip. void outer_draw() { poll_keyboard(); + fullbright_update(); gui_handle_input(); // HL2H_DRAW_TEST=1 draws a probe rect without needing the GUI open static bool draw_test = getenv("HL2H_DRAW_TEST") != nullptr; -- cgit v1.2.3