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/hl2h.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/hl2h.h') diff --git a/src/hl2h.h b/src/hl2h.h index 45a297e..e441167 100644 --- a/src/hl2h.h +++ b/src/hl2h.h @@ -67,6 +67,7 @@ struct GameInterfaces { void *engineserver = nullptr; // IVEngineServer021 (edict access, incl. server entities) void *debugoverlay = nullptr; // IVDebugOverlay003 (engine-accurate world->screen) void *enginetrace = nullptr; // EngineTraceClient003 (world vischeck) + void *cvar = nullptr; // VEngineCvar004 (mat_fullbright etc.) }; extern GameInterfaces g_iface; @@ -176,7 +177,8 @@ enum FeatureId { FEAT_MELEE = 7, FEAT_SPREAD = 8, FEAT_ITEM_ESP = 9, - FEAT_COUNT = 10 + FEAT_FULLBRIGHT = 10, + FEAT_COUNT = 11 }; enum EspOption { ESP_OPT_SHOW_NEUTRAL = 0, @@ -208,7 +210,7 @@ struct FeatureState { }; extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp, - g_aimbot, g_triggerbot, g_silentaim, g_item_esp; + g_aimbot, g_triggerbot, g_silentaim, g_item_esp, g_fullbright; extern bool g_bhop_autostrafe; extern bool g_jumpbug_assist; extern bool g_spread_no_spread; @@ -243,6 +245,9 @@ void fix_verified_crc(int seq, uint32_t crc); uint32_t usercmd_checksum(const CUserCmd *c); bool find_input_global(); void resolve_netvars(); +bool cvar_set_int(const char *name, int value); +void fullbright_update(); +void fullbright_invalidate(); bool resolve_server_netvars(); int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); bool server_set_velocity_z(int idx, float vz); -- cgit v1.2.3