summaryrefslogtreecommitdiffstats
path: root/src/hl2h.h
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-03 23:21:13 +0100
committersalmonik <salmonik@tuta.io>2026-11-03 23:21:13 +0100
commit1f7c91905f69baba0aca8265c84deaba2ddac98a (patch)
tree9014a7e63e5531a05ff96c80a07ecccda927a533 /src/hl2h.h
parentRemove temporary crash-stage markers (diff)
downloadhl2h-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 'src/hl2h.h')
-rw-r--r--src/hl2h.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/hl2h.h b/src/hl2h.h
index 2824d3c..e90ba91 100644
--- a/src/hl2h.h
+++ b/src/hl2h.h
@@ -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};
183enum EspOption { 184enum EspOption {
184 ESP_OPT_SHOW_NEUTRAL = 0, 185 ESP_OPT_SHOW_NEUTRAL = 0,
@@ -210,7 +211,10 @@ struct FeatureState {
210}; 211};
211 212
212extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp, 213extern 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;
216extern bool g_tint_world_on, g_tint_sky_on;
217extern int g_tint_world_rgb[3], g_tint_sky_rgb[3];
214extern bool g_bhop_autostrafe; 218extern bool g_bhop_autostrafe;
215extern bool g_jumpbug_assist; 219extern bool g_jumpbug_assist;
216extern bool g_spread_no_spread; 220extern bool g_spread_no_spread;
@@ -248,6 +252,8 @@ void resolve_netvars();
248bool cvar_set_int(const char *name, int value); 252bool cvar_set_int(const char *name, int value);
249void fullbright_update(); 253void fullbright_update();
250void fullbright_invalidate(); 254void fullbright_invalidate();
255void world_tint_update();
256void world_tint_invalidate();
251bool resolve_server_netvars(); 257bool resolve_server_netvars();
252int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); 258int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out);
253bool server_set_velocity_z(int idx, float vz); 259bool server_set_velocity_z(int idx, float vz);