diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-03 23:51:02 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-03 23:51:02 +0100 |
| commit | 95b5be2299b332917ae63c45252cb9744a3460cd (patch) | |
| tree | 1da6d89d8ddf9f724368738a4969f8dd308cbcce /src/hl2h.h | |
| parent | AI: treat scripted NPCs as neutral; Lamarr neutral (diff) | |
| download | hl2h-95b5be2299b332917ae63c45252cb9744a3460cd.tar.gz hl2h-95b5be2299b332917ae63c45252cb9744a3460cd.zip | |
World: add skybox changer
New Visuals -> Skybox card with a runtime sv_skyname override using the same
mechanism as the stock skybox_swapper entity. The choice list is the HL2
skybox set extracted from the game VPKs.
The map's own sky is captured from loaded materials (SkyBox group, parsing
skybox/<name>... face names) before the first override, so turning the
feature off or picking "Map default" restores it; a level change restores it
implicitly. Sky changes invalidate the world tint so new sky materials are
tinted as well.
GUI: add a CK_CHOICE control (value box with < / > zones).
Diffstat (limited to '')
| -rw-r--r-- | src/hl2h.h | 11 |
1 files changed, 9 insertions, 2 deletions
| @@ -180,7 +180,8 @@ enum FeatureId { | |||
| 180 | FEAT_FULLBRIGHT = 10, | 180 | FEAT_FULLBRIGHT = 10, |
| 181 | FEAT_WORLD_TINT = 11, | 181 | FEAT_WORLD_TINT = 11, |
| 182 | FEAT_FOG = 12, | 182 | FEAT_FOG = 12, |
| 183 | FEAT_COUNT = 13 | 183 | FEAT_SKYBOX = 13, |
| 184 | FEAT_COUNT = 14 | ||
| 184 | }; | 185 | }; |
| 185 | enum EspOption { | 186 | enum EspOption { |
| 186 | ESP_OPT_SHOW_NEUTRAL = 0, | 187 | ESP_OPT_SHOW_NEUTRAL = 0, |
| @@ -213,11 +214,15 @@ struct FeatureState { | |||
| 213 | 214 | ||
| 214 | extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp, | 215 | extern FeatureState g_bhop, g_abh, g_jumpbug, g_melee, g_spread, g_esp, |
| 215 | g_aimbot, g_triggerbot, g_silentaim, g_item_esp, g_fullbright, | 216 | g_aimbot, g_triggerbot, g_silentaim, g_item_esp, g_fullbright, |
| 216 | g_world_tint, g_fog; | 217 | g_world_tint, g_fog, g_skybox; |
| 217 | extern bool g_tint_world_on, g_tint_sky_on, g_tint_prop_on; | 218 | extern bool g_tint_world_on, g_tint_sky_on, g_tint_prop_on; |
| 218 | extern int g_tint_world_rgb[3], g_tint_sky_rgb[3], g_tint_prop_rgb[3]; | 219 | extern int g_tint_world_rgb[3], g_tint_sky_rgb[3], g_tint_prop_rgb[3]; |
| 219 | extern bool g_fog_skybox, g_fog_disable; | 220 | extern bool g_fog_skybox, g_fog_disable; |
| 220 | extern int g_fog_rgb[3], g_fog_start, g_fog_end; | 221 | extern int g_fog_rgb[3], g_fog_start, g_fog_end; |
| 222 | extern int g_skybox_choice; | ||
| 223 | int skybox_option_count(); | ||
| 224 | const char *skybox_option_name(int i); | ||
| 225 | const char *const *skybox_options(); | ||
| 221 | extern bool g_bhop_autostrafe; | 226 | extern bool g_bhop_autostrafe; |
| 222 | extern bool g_jumpbug_assist; | 227 | extern bool g_jumpbug_assist; |
| 223 | extern bool g_spread_no_spread; | 228 | extern bool g_spread_no_spread; |
| @@ -260,6 +265,8 @@ void world_tint_update(); | |||
| 260 | void world_tint_invalidate(); | 265 | void world_tint_invalidate(); |
| 261 | void fog_update(); | 266 | void fog_update(); |
| 262 | void fog_invalidate(); | 267 | void fog_invalidate(); |
| 268 | void skybox_update(); | ||
| 269 | void skybox_invalidate(); | ||
| 263 | bool resolve_server_netvars(); | 270 | bool resolve_server_netvars(); |
| 264 | int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); | 271 | int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); |
| 265 | bool server_set_velocity_z(int idx, float vz); | 272 | bool server_set_velocity_z(int idx, float vz); |
