fix: #2623 NetworkServer.SetClientReady returns if already ready. fixes clients spamming ReadyMessage to force observer rebuilds etc. [imer]

This commit is contained in:
vis2k 2023-01-29 19:08:32 +09:00
parent c4e9071700
commit 564b6f4237

View File

@ -1034,6 +1034,11 @@ public static void SetClientReady(NetworkConnectionToClient conn)
{ {
// Debug.Log($"SetClientReadyInternal for conn:{conn}"); // Debug.Log($"SetClientReadyInternal for conn:{conn}");
// only if not already ready yet.
// prevents clients spamming ReadyMessage to force observer rebuilds.
// fixes: https://github.com/MirrorNetworking/Mirror/issues/2623
if (conn.isReady) return;
// set ready // set ready
conn.isReady = true; conn.isReady = true;