diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-03 23:21:13 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-03 23:21:13 +0100 |
| commit | 1f7c91905f69baba0aca8265c84deaba2ddac98a (patch) | |
| tree | 9014a7e63e5531a05ff96c80a07ecccda927a533 /src/hl2h.h | |
| parent | Remove temporary crash-stage markers (diff) | |
| download | hl2h-1f7c91905f69baba0aca8265c84deaba2ddac98a.tar.gz hl2h-1f7c91905f69baba0aca8265c84deaba2ddac98a.zip | |
World: add world/sky material colour modulation
Port Amalgam's modulation approach: obtain IMaterialSystem from the already
loaded materialsystem.so (VMaterialSystem080) and walk materials with
FirstMaterial/NextMaterial/GetMaterial. ColorModulate the "World textures"
group (sky names excluded) and the "SkyBox textures"/sky-named group.
The walk runs only when the enabled groups or colours change, restores white
when disabled, and re-applies after level changes. Before touching materials,
GetNumMaterials() and the first material's name/group are sanity-checked so a
wrong vtable slot logs and aborts instead of walking garbage.
GUI: "World tint" card with world/sky toggles and RGB sliders; config section
[worldtint].
Diffstat (limited to '')
| -rw-r--r-- | src/hl2h.h | 10 |
1 files changed, 8 insertions, 2 deletions
| @@ -178,7 +178,8 @@ enum FeatureId { | |||
| 178 | FEAT_SPREAD = 8, | 178 | FEAT_SPREAD = 8, |
| 179 | FEAT_ITEM_ESP = 9, | 179 | FEAT_ITEM_ESP = 9, |
| 180 | FEAT_FULLBRIGHT = 10, | 180 | FEAT_FULLBRIGHT = 10, |
| 181 | FEAT_COUNT = 11 | 181 | FEAT_WORLD_TINT = 11, |
| 182 | FEAT_COUNT = 12 | ||
| 182 | }; | 183 | }; |
| 183 | enum EspOption { | 184 | enum EspOption { |
| 184 | ESP_OPT_SHOW_NEUTRAL = 0, | 185 | ESP_OPT_SHOW_NEUTRAL = 0, |
| @@ -210,7 +211,10 @@ struct FeatureState { | |||
| 210 | }; | 211 | }; |
| 211 | 212 | ||
| 212 | extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp, | 213 | extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp, |
| 213 | g_aimbot, g_triggerbot, g_silentaim, g_item_esp, g_fullbright; | 214 | g_aimbot, g_triggerbot, g_silentaim, g_item_esp, g_fullbright, |
| 215 | g_world_tint; | ||
| 216 | extern bool g_tint_world_on, g_tint_sky_on; | ||
| 217 | extern int g_tint_world_rgb[3], g_tint_sky_rgb[3]; | ||
| 214 | extern bool g_bhop_autostrafe; | 218 | extern bool g_bhop_autostrafe; |
| 215 | extern bool g_jumpbug_assist; | 219 | extern bool g_jumpbug_assist; |
| 216 | extern bool g_spread_no_spread; | 220 | extern bool g_spread_no_spread; |
| @@ -248,6 +252,8 @@ void resolve_netvars(); | |||
| 248 | bool cvar_set_int(const char *name, int value); | 252 | bool cvar_set_int(const char *name, int value); |
| 249 | void fullbright_update(); | 253 | void fullbright_update(); |
| 250 | void fullbright_invalidate(); | 254 | void fullbright_invalidate(); |
| 255 | void world_tint_update(); | ||
| 256 | void world_tint_invalidate(); | ||
| 251 | bool resolve_server_netvars(); | 257 | bool resolve_server_netvars(); |
| 252 | int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); | 258 | int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); |
| 253 | bool server_set_velocity_z(int idx, float vz); | 259 | bool server_set_velocity_z(int idx, float vz); |
