isle-portable/extensions/src/multiplayer
foxtacles ed4e248be4
Implement display actors (#6)
* Implement display actor override for multiplayer extension

Add displayActorIndex to the multiplayer protocol, allowing players to
choose any of the 66 character models from g_actorInfoInit via the
multiplayer:actor INI setting. The visual display is decoupled from the
gameplay actor ID while maintaining backward compatibility.

- Protocol: Add displayActorIndex field to PlayerStateMsg and validation helpers
- RemotePlayer: Use display actor name for cloning instead of actorId
- NetworkManager: Broadcast/handle displayActorIndex, respawn on display change
- ThirdPersonCamera: Create/manage display clone ROI for local player override
- INI: Read multiplayer:actor setting and resolve to g_actorInfoInit index

* Use array syntax for INI option access in display actor setup

Consistent with how relayUrl and room are read from options.

* Fix display actor ROI handling in 3rd person camera

- Fix direction flip targeting display clone instead of native ROI in
  Disable(), ReinitForCharacter(), and OnCamAnimEnd(). The native ROI is
  the source of truth for TransformPointOfView and Tick() sync.
- Fix use-after-free: DestroyDisplayClone() now nulls m_playerROI when
  it points to the destroyed clone, preventing dangling pointer access
  in BuildRideAnimation after a 3rd→1st→3rd person toggle on a vehicle.
- Recreate display clone in ReinitForCharacter() vehicle branch.
- Extract EnsureDisplayROI() helper to deduplicate clone setup pattern.
- Move IsValidDisplayActorIndex() to charactercloner.h, replacing magic
  number 66 with sizeOfArray(g_actorInfoInit).

* Remove display actors plan document
2026-03-07 18:02:53 +01:00
..
platforms/emscripten Fix 3rd/1st person camera switch direction bugs (#4) 2026-03-07 05:49:39 +01:00
server Add room management, relay capacity, and rejection handling 2026-03-01 14:37:08 -08:00
animutils.cpp 3rd person camera (#3) 2026-03-07 01:38:45 +01:00
charactercloner.cpp Add missing cstdio include for sprintf in charactercloner 2026-03-01 12:46:37 -08:00
networkmanager.cpp Implement display actors (#6) 2026-03-07 18:02:53 +01:00
protocol.cpp 3rd person camera (#3) 2026-03-07 01:38:45 +01:00
remoteplayer.cpp Implement display actors (#6) 2026-03-07 18:02:53 +01:00
thirdpersoncamera.cpp Implement display actors (#6) 2026-03-07 18:02:53 +01:00
worldstatesync.cpp Fix 3rd/1st person camera switch direction bugs (#4) 2026-03-07 05:49:39 +01:00