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). --- CONTEXT.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index 741050d..f2b091a 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -358,6 +358,21 @@ vocabulary / decisions. - End is clamped above Start. Re-applied on level change via `fog_invalidate()`. Saved as `[fog] active/bind/r/g/b/start/end/skybox/disable`. +### Skybox changer + +- `sv_skyname ` through `ClientCmd`, the same mechanism the stock + `skybox_swapper` entity uses. Choice list is the HL2 skybox set from the + game's VPK (no episode-only skies, so a selected sky always exists). +- Before the first override of a map, the map's own sky is captured by + scanning loaded materials in the `SkyBox textures` group and parsing + `skybox/(_hdr|_ldr)?(rt|bk|lf|ft|up|dn)`. Disabling the feature (or + choosing "Map default") restores that name; a level change also restores it + naturally, so `skybox_invalidate()` just drops the captured state. +- Changing the sky invalidates the world tint so the freshly loaded sky + materials get the sky colour. +- Saved as `[skybox] active/bind/choice`. The GUI uses a `CK_CHOICE` + control (value box with `<`/`>` hit zones). + ## Logging - `/tmp/hl2hake.log` is opened once at startup with `"w"` (so it only contains -- cgit v1.2.3