Add match-start readiness barrier (Loading phase)

Gate the Lobby-to-world transition on a new MatchSubPhase.Loading before
Hide: movement stays frozen and the Hide countdown does not start until
every connected client has spawned all match avatars and applied their
paintings.

- MatchManager: Loading phase; matchLoadTimeout tunable; Match_BeginLoad
  broadcasts the respawned avatar NetworkObjectIds (+ generation tag),
  Match_Ready collects per-client ACKs (host self-checks locally); barrier
  coroutine in RunMatchPhases before Hide; disconnect/teardown cleanup.
- GameModeManager: freeze local player (movement/paint/tab) during Loading,
  restored via ActiveMode.Enter() on transition to Hide (no camera jump).
- NetworkPlayerSetup: treat Loading like Hide in ComputeVisible so a
  fast-loading client cannot reveal a hider early.
- MatchHud: "Loading" phase label.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 4.8 committed 2026-07-05 22:07:59 +02:00
1 parent ec395ab766
commit fba4780c0e
4 files changed
+234 -3

No files matched your search

+1
View File
@@ -104,6 +104,7 @@ public class MatchHud : MonoBehaviour
{
switch (phase)
{
case MatchManager.MatchSubPhase.Loading: return "Loading";
case MatchManager.MatchSubPhase.Hide: return "Hide";
case MatchManager.MatchSubPhase.Seek: return "Seek";
case MatchManager.MatchSubPhase.Resolution: return "Resolution";