From 95b5be2299b332917ae63c45252cb9744a3460cd Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 3 Nov 2026 23:51:02 +0100 Subject: 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/... 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). --- src/hl2h.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/hl2h.h') diff --git a/src/hl2h.h b/src/hl2h.h index 877afac..3cb131d 100644 --- a/src/hl2h.h +++ b/src/hl2h.h @@ -180,7 +180,8 @@ enum FeatureId { FEAT_FULLBRIGHT = 10, FEAT_WORLD_TINT = 11, FEAT_FOG = 12, - FEAT_COUNT = 13 + FEAT_SKYBOX = 13, + FEAT_COUNT = 14 }; enum EspOption { ESP_OPT_SHOW_NEUTRAL = 0, @@ -213,11 +214,15 @@ 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_fullbright, - g_world_tint, g_fog; + g_world_tint, g_fog, g_skybox; extern bool g_tint_world_on, g_tint_sky_on, g_tint_prop_on; extern int g_tint_world_rgb[3], g_tint_sky_rgb[3], g_tint_prop_rgb[3]; extern bool g_fog_skybox, g_fog_disable; extern int g_fog_rgb[3], g_fog_start, g_fog_end; +extern int g_skybox_choice; +int skybox_option_count(); +const char *skybox_option_name(int i); +const char *const *skybox_options(); extern bool g_bhop_autostrafe; extern bool g_jumpbug_assist; extern bool g_spread_no_spread; @@ -260,6 +265,8 @@ void world_tint_update(); void world_tint_invalidate(); void fog_update(); void fog_invalidate(); +void skybox_update(); +void skybox_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