diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-03 22:22:08 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-03 22:22:08 +0100 |
| commit | 4b7dd1ca76ff0f97d53038ac9a11165f2fc68528 (patch) | |
| tree | d30473e54ecbb18f14e54e7cf678e7e7dc1a2a52 /src/hl2h.h | |
| parent | Vischeck: only glass materials are glass; log font/glass diagnostics (diff) | |
| download | hl2h-4b7dd1ca76ff0f97d53038ac9a11165f2fc68528.tar.gz hl2h-4b7dd1ca76ff0f97d53038ac9a11165f2fc68528.zip | |
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.
Diffstat (limited to 'src/hl2h.h')
| -rw-r--r-- | src/hl2h.h | 9 |
1 files changed, 7 insertions, 2 deletions
| @@ -67,6 +67,7 @@ struct GameInterfaces { | |||
| 67 | void *engineserver = nullptr; // IVEngineServer021 (edict access, incl. server entities) | 67 | void *engineserver = nullptr; // IVEngineServer021 (edict access, incl. server entities) |
| 68 | void *debugoverlay = nullptr; // IVDebugOverlay003 (engine-accurate world->screen) | 68 | void *debugoverlay = nullptr; // IVDebugOverlay003 (engine-accurate world->screen) |
| 69 | void *enginetrace = nullptr; // EngineTraceClient003 (world vischeck) | 69 | void *enginetrace = nullptr; // EngineTraceClient003 (world vischeck) |
| 70 | void *cvar = nullptr; // VEngineCvar004 (mat_fullbright etc.) | ||
| 70 | }; | 71 | }; |
| 71 | extern GameInterfaces g_iface; | 72 | extern GameInterfaces g_iface; |
| 72 | 73 | ||
| @@ -176,7 +177,8 @@ enum FeatureId { | |||
| 176 | FEAT_MELEE = 7, | 177 | FEAT_MELEE = 7, |
| 177 | FEAT_SPREAD = 8, | 178 | FEAT_SPREAD = 8, |
| 178 | FEAT_ITEM_ESP = 9, | 179 | FEAT_ITEM_ESP = 9, |
| 179 | FEAT_COUNT = 10 | 180 | FEAT_FULLBRIGHT = 10, |
| 181 | FEAT_COUNT = 11 | ||
| 180 | }; | 182 | }; |
| 181 | enum EspOption { | 183 | enum EspOption { |
| 182 | ESP_OPT_SHOW_NEUTRAL = 0, | 184 | ESP_OPT_SHOW_NEUTRAL = 0, |
| @@ -208,7 +210,7 @@ struct FeatureState { | |||
| 208 | }; | 210 | }; |
| 209 | 211 | ||
| 210 | extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp, | 212 | extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp, |
| 211 | g_aimbot, g_triggerbot, g_silentaim, g_item_esp; | 213 | g_aimbot, g_triggerbot, g_silentaim, g_item_esp, g_fullbright; |
| 212 | extern bool g_bhop_autostrafe; | 214 | extern bool g_bhop_autostrafe; |
| 213 | extern bool g_jumpbug_assist; | 215 | extern bool g_jumpbug_assist; |
| 214 | extern bool g_spread_no_spread; | 216 | extern bool g_spread_no_spread; |
| @@ -243,6 +245,9 @@ void fix_verified_crc(int seq, uint32_t crc); | |||
| 243 | uint32_t usercmd_checksum(const CUserCmd *c); | 245 | uint32_t usercmd_checksum(const CUserCmd *c); |
| 244 | bool find_input_global(); | 246 | bool find_input_global(); |
| 245 | void resolve_netvars(); | 247 | void resolve_netvars(); |
| 248 | bool cvar_set_int(const char *name, int value); | ||
| 249 | void fullbright_update(); | ||
| 250 | void fullbright_invalidate(); | ||
| 246 | bool resolve_server_netvars(); | 251 | bool resolve_server_netvars(); |
| 247 | int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); | 252 | int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); |
| 248 | bool server_set_velocity_z(int idx, float vz); | 253 | bool server_set_velocity_z(int idx, float vz); |
