isle-portable/LEGO1
foxtacles eb6d2b8728
Sync sky light (#9)
* Sync sky color and light position in multiplayer

Add ENTITY_SKY and ENTITY_LIGHT to the WorldEvent system so the host
controls sky color (hue/saturation via observatory sun/moon/palette
buttons) and light position (globe arrows) with the same
host-authoritative pattern used for plants and buildings. Non-host
players send requests to the host who applies and broadcasts. Sky/light
state is appended to the world snapshot so joining players get the
current values.

https://claude.ai/code/session_01X2cPVQEo7c92wpWA7QPPMG

* Clean up sky/light sync: remove debug logging, DRY apply logic, fix host routing

- Extract ApplySkyLightState helper to deduplicate sky/light apply code
  between RestoreSkyLightState and HandleWorldSnapshot
- Remove all SDL_Log debug calls and SDL_log.h includes
- Remove dead OnWorldEnabled method from WorldStateSync (replaced by
  OnHostChanged in OnSaveLoaded)
- Fix HandleSkyLightMutation host path: return FALSE to let local
  switch case proceed, instead of duplicating via ApplyWorldEvent
- Simplify isle.cpp HandleControl: split observatory cases into
  individual switch arms with single early-return multiplayer hook
- Add save load hooks to sync world state with multiplayer peers
- Fix player count to exclude local player without valid actor
- Support broadcast snapshots (targetPeerId=0) in relay server

---------
2026-03-08 05:55:00 +01:00
..
lego Sync sky light (#9) 2026-03-08 05:55:00 +01:00
modeldb Merge remote-tracking branch 'isle/master' 2025-06-24 09:05:44 -07:00
mxdirectx Plug leaks until Information Center, detected by the LeakSanitizer (#764) 2026-01-04 03:35:42 +01:00
mxgeometry Merge remote-tracking branch 'isle/master' 2025-09-12 12:35:22 -07:00
mxstl Implement LegoPathController::FUN_10048310 (#1192) 2024-12-06 20:50:40 +01:00
omni Update miniaudio to 0.11.24 (#774) 2026-01-30 19:42:06 -08:00
realtime Merge remote-tracking branch 'isle/master' 2026-01-30 17:06:10 -08:00
res Support building isle with modern MSVC + msys2 (#421) 2024-01-10 23:34:32 +01:00
tgl Plug memory leaks while moving around in the Information Center (#768) 2026-01-06 04:17:23 +01:00
viewmanager Merge remote-tracking branch 'isle/master' 2026-01-07 16:39:54 -07:00
cursor.h Make draw cursor feature work for modern platforms (#480) 2025-07-03 18:05:46 +02:00
define.cpp Match LegoActor and LegoPathActor in BETA10 (#1524) 2025-05-27 22:04:01 +02:00
define.h Implement/match LegoRaceActor (#1072) 2024-08-02 22:29:21 -07:00
lego1_export.h Use SDL3 functions in more locations (#44) 2024-12-24 18:04:46 -07:00
lego1_pch.h Merge remote-tracking branch 'isle/master' 2026-01-30 17:06:10 -08:00
library_msvc.h Beta match LegoLOD and related classes (#1704) 2026-01-05 23:45:36 +01:00
library_smack.h Fix inclusion guards of 3 files (#1509) 2025-05-20 02:15:30 +02:00
library_smartheap.h Add SmartHeap for LEGO1 (#1694) 2025-10-12 07:36:36 +02:00
main.cpp Restructure miniwin and add support for 3D backends 2025-05-29 04:07:53 +02:00