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:
1 parent
ec395ab766
commit
fba4780c0e
4 files changed
+234
-3
No files matched your search
@@ -326,6 +326,9 @@ public class NetworkPlayerSetup : NetworkBehaviour
|
||||
if (role != PlayerRole.Hider) return true; // hunters are always visible
|
||||
|
||||
var phase = match.LocalSubPhase;
|
||||
// The pre-match loading window conceals hiders exactly like Hide, so a fast-loading client can't reveal
|
||||
// a hider (once its paint applies) before the match proper even begins.
|
||||
if (phase == MatchManager.MatchSubPhase.Loading) phase = MatchManager.MatchSubPhase.Hide;
|
||||
if (phase == MatchManager.MatchSubPhase.Resolution) return true; // all revealed at the end
|
||||
|
||||
if (match.LocalMatchMode == MatchManager.MatchMode.Conversion)
|
||||
|
||||
Reference in new issue
Block a user