* Add free camera orbit controls to multiplayer third-person camera
Replace the fixed camera offset with dynamic orbit parameters (yaw,
pitch, distance) computed from spherical coordinates. Mouse wheel
controls zoom, right-click drag controls orbit, and two-finger
touch gestures support pinch-zoom and orbit on touchscreens.
The controls are always active when third-person mode is enabled.
A single SDL event forwarding hook is added to the main event loop;
all other changes are contained within the multiplayer extension.
https://claude.ai/code/session_013FyPCrJSaHxiJwdfGBVnYP
* Fix linker error and refactor orbit camera controls
Move HandleSDLEvent extension call from ISLE (no EXTENSIONS define) into
LegoInputManager::UpdateLastInputMethod in LEGO1 to fix unresolved
symbol errors. DRY up orbit camera code with ClampPitch/ClampDistance/
ResetOrbitState/ApplyOrbitCamera helpers. Simplify direction vector
computation. Fix mouse orbit yaw direction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fixes
---------
Co-authored-by: Claude <noreply@anthropic.com>
* 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
---------
- Fix broadcast direction: use IsActive() instead of IsROITurnedAround()
so the negate in BroadcastLocalState only fires when movement inversion
is active, not based on a default-true flag
- Fix vehicle ROI direction for 3rd-person camera: undo Enter()'s
TurnAround on small vehicles so the backward-z convention is preserved.
Vehicles are placed with ROI z opposite to visual forward, and Enter()'s
TurnAround breaks this for 3rd-person rendering. Applied in both
OnActorEnter (entering while 3rd-person enabled) and ReinitForCharacter
(enabling 3rd-person while already on a vehicle)
- Fix vehicle direction on exit: apply extra TurnAround in OnActorExit
when 3rd-person is active, since Exit()'s TurnAround assumes Enter()'s
TurnAround is still in effect
- Add WrappedUpdateWorldData() after manual direction flips in Disable()
and ReinitForCharacter() to keep bounding volumes consistent and prevent
stale world data from causing momentary camera/direction glitches
- Remove unused IsROITurnedAround() method
- Fix data race between WASM exports and game thread
Move world state synchronization logic (snapshots, events, entity
mutation routing) into a dedicated WorldStateSync class, reducing
NetworkManager from ~790 to ~420 lines.