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